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

Added /dev paths to layer comparison

Lxc images have /dev (devices). This creates a list with the /dev paths in the test.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
This commit is contained in:
Abin Shahab 2015-02-02 00:42:35 +00:00
parent 6081a3ca90
commit ea0fd0e8e5

View file

@ -400,6 +400,7 @@ func TestSaveDirectoryPermissions(t *testing.T) {
}
found := false
var entriesSansDev []string
for _, entry := range dirs {
if entry.IsDir() {
layerPath := filepath.Join(extractionDirectory, entry.Name(), "layer.tar")
@ -410,11 +411,16 @@ func TestSaveDirectoryPermissions(t *testing.T) {
}
entries, err := ListTar(f)
for _, e := range entries {
if !strings.Contains(e, "dev/") {
entriesSansDev = append(entriesSansDev, e)
}
}
if err != nil {
t.Fatalf("encountered error while listing tar entries: %s", err)
}
if reflect.DeepEqual(entries, layerEntries) || reflect.DeepEqual(entries, layerEntriesAUFS) {
if reflect.DeepEqual(entriesSansDev, layerEntries) || reflect.DeepEqual(entriesSansDev, layerEntriesAUFS) {
found = true
break
}