integcli: fix permission detection for aufs

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
unclejack 2014-09-19 21:08:57 +03:00
Родитель e91de29e08
Коммит 1a0347ff1d
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -198,6 +198,7 @@ func TestSaveMultipleNames(t *testing.T) {
// Issue #6722 #5892 ensure directories are included in changes
func TestSaveDirectoryPermissions(t *testing.T) {
layerEntries := []string{"opt/", "opt/a/", "opt/a/b/", "opt/a/b/c"}
layerEntriesAUFS := []string{"./", ".wh..wh.aufs", ".wh..wh.orph/", ".wh..wh.plnk/", "opt/", "opt/a/", "opt/a/b/", "opt/a/b/c"}
name := "save-directory-permissions"
tmpDir, err := ioutil.TempDir("", "save-layers-with-directories")
@ -245,8 +246,9 @@ func TestSaveDirectoryPermissions(t *testing.T) {
t.Fatalf("encountered error while listing tar entries: %s", err)
}
if reflect.DeepEqual(entries, layerEntries) {
if reflect.DeepEqual(entries, layerEntries) || reflect.DeepEqual(entries, layerEntriesAUFS) {
found = true
break
}
}
}