зеркало из https://github.com/microsoft/docker.git
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:
Родитель
6081a3ca90
Коммит
ea0fd0e8e5
|
@ -400,6 +400,7 @@ func TestSaveDirectoryPermissions(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
found := false
|
found := false
|
||||||
|
var entriesSansDev []string
|
||||||
for _, entry := range dirs {
|
for _, entry := range dirs {
|
||||||
if entry.IsDir() {
|
if entry.IsDir() {
|
||||||
layerPath := filepath.Join(extractionDirectory, entry.Name(), "layer.tar")
|
layerPath := filepath.Join(extractionDirectory, entry.Name(), "layer.tar")
|
||||||
|
@ -410,11 +411,16 @@ func TestSaveDirectoryPermissions(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
entries, err := ListTar(f)
|
entries, err := ListTar(f)
|
||||||
|
for _, e := range entries {
|
||||||
|
if !strings.Contains(e, "dev/") {
|
||||||
|
entriesSansDev = append(entriesSansDev, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("encountered error while listing tar entries: %s", err)
|
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
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче