Browse code

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 authored on 2015/02/05 06:51:44
Showing 1 changed files
... ...
@@ -5,7 +5,6 @@ import (
5 5
 	"io/ioutil"
6 6
 	"os"
7 7
 	"path"
8
-	"strings"
9 8
 	"syscall"
10 9
 	"testing"
11 10
 
... ...
@@ -74,7 +73,8 @@ func newDriver(t *testing.T, name string) *Driver {
74 74
 
75 75
 	d, err := graphdriver.GetDriver(name, root, nil)
76 76
 	if err != nil {
77
-		if err == graphdriver.ErrNotSupported || err == graphdriver.ErrPrerequisites || strings.Contains(err.Error(), "'overlay' is not supported over") {
77
+		t.Logf("graphdriver: %s\n", err.Error())
78
+		if err == graphdriver.ErrNotSupported || err == graphdriver.ErrPrerequisites || err == graphdriver.ErrIncompatibleFS {
78 79
 			t.Skipf("Driver %s not supported", name)
79 80
 		}
80 81
 		t.Fatal(err)