Browse Source

Fix for running unit tests on a 3.18 kernel with btrfs.

Was failing on overlay before and comparing the wrong error.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Jessica Frazelle 10 năm trước cách đây
mục cha
commit
c809fc552b

+ 2 - 2
daemon/graphdriver/graphtest/graphtest.go

@@ -5,7 +5,6 @@ import (
 	"io/ioutil"
 	"io/ioutil"
 	"os"
 	"os"
 	"path"
 	"path"
-	"strings"
 	"syscall"
 	"syscall"
 	"testing"
 	"testing"
 
 
@@ -74,7 +73,8 @@ func newDriver(t *testing.T, name string) *Driver {
 
 
 	d, err := graphdriver.GetDriver(name, root, nil)
 	d, err := graphdriver.GetDriver(name, root, nil)
 	if err != nil {
 	if err != nil {
-		if err == graphdriver.ErrNotSupported || err == graphdriver.ErrPrerequisites || strings.Contains(err.Error(), "'overlay' is not supported over") {
+		t.Logf("graphdriver: %s\n", err.Error())
+		if err == graphdriver.ErrNotSupported || err == graphdriver.ErrPrerequisites || err == graphdriver.ErrIncompatibleFS {
 			t.Skipf("Driver %s not supported", name)
 			t.Skipf("Driver %s not supported", name)
 		}
 		}
 		t.Fatal(err)
 		t.Fatal(err)