Update basic test to allow being run in parallel on client

The basic test does an assert on the existing snapshots.
Update the check just to assert the expected snapshots were
found during the walk.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan 2017-08-22 17:14:06 -07:00
parent 750771f6d0
commit f74cea71dd
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB

View File

@ -190,7 +190,14 @@ func checkSnapshotterBasic(ctx context.Context, t *testing.T, snapshotter snapsh
return nil return nil
})) }))
assert.Equal(t, expected, walked) for ek, ev := range expected {
av, ok := walked[ek]
if !ok {
t.Errorf("Missing stat for %v", ek)
continue
}
assert.Equal(t, ev, av)
}
nextnext := filepath.Join(work, "nextnextlayer") nextnext := filepath.Join(work, "nextnextlayer")
if err := os.MkdirAll(nextnext, 0777); err != nil { if err := os.MkdirAll(nextnext, 0777); err != nil {