containerd/snapshot_test.go
Derek McGowan 585f7d6494
Skip test on windows
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-27 15:42:34 -07:00

34 lines
652 B
Go

package containerd
import (
"context"
"runtime"
"testing"
"github.com/containerd/containerd/snapshot"
"github.com/containerd/containerd/snapshot/testsuite"
)
func newSnapshotter(ctx context.Context, root string) (snapshot.Snapshotter, func(), error) {
client, err := New(address)
if err != nil {
return nil, nil, err
}
sn := client.SnapshotService("")
return sn, func() {
client.Close()
}, nil
}
func TestSnapshotterClient(t *testing.T) {
if testing.Short() {
t.Skip()
}
if runtime.GOOS == "windows" {
t.Skip("snapshots not yet supported on Windows")
}
testsuite.SnapshotterSuite(t, "SnapshotterClient", newSnapshotter)
}