snapshot/overlay: add snapshot test suite to overlay

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-02-02 18:55:53 -08:00
parent 68fd25221d
commit d0b4ce8d17
No known key found for this signature in database
GPG key ID: 67B3DED84EDC823F
3 changed files with 124 additions and 31 deletions

View file

@ -49,7 +49,16 @@ func DumpDir(t *testing.T, root string) {
return err
}
t.Log(fi.Mode(), path)
if fi.Mode()&os.ModeSymlink != 0 {
target, err := os.Readlink(path)
if err != nil {
return err
}
t.Log(fi.Mode(), path, "->", target)
} else {
t.Log(fi.Mode(), path)
}
return nil
}); err != nil {
t.Fatalf("error dumping directory: %v", err)