1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

grapdriver: Skip tests on non-supported backends

For now this means the btrfs backend is skipped when run
inside make test. You can however run it manually if you want.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
This commit is contained in:
Alexander Larsson 2014-05-06 14:44:42 +02:00
parent 4bdb8c03fc
commit 55cd7dd7f9

View file

@ -31,6 +31,9 @@ func newDriver(t *testing.T, name string) *Driver {
d, err := graphdriver.GetDriver(name, root)
if err != nil {
if err == graphdriver.ErrNotSupported {
t.Skip("Driver %s not supported", name)
}
t.Fatal(err)
}
return &Driver{d, root, 1}
@ -54,7 +57,7 @@ func GetDriver(t *testing.T, name string) graphdriver.Driver {
func PutDriver(t *testing.T) {
if drv == nil {
t.Fatal("No driver to put!")
t.Skip("No driver to put!")
}
drv.refCount--
if drv.refCount == 0 {