Tests should set up snapshot prior to any use of fs

These tests would have failed if any image had a USER declaration in it,
but because the test image never has, these were never caught. Adding
supplemental GIDs on any image revealed the issue.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes
2018-09-14 14:36:01 -04:00
parent 13931e41d6
commit 85e8221f10
5 changed files with 45 additions and 48 deletions

View File

@@ -57,7 +57,7 @@ func BenchmarkContainerCreate(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
id := fmt.Sprintf("%s-%d", b.Name(), i)
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image))
container, err := client.NewContainer(ctx, id, WithNewSnapshot(id, image), WithSpec(spec))
if err != nil {
b.Error(err)
return
@@ -98,7 +98,7 @@ func BenchmarkContainerStart(b *testing.B) {
for i := 0; i < b.N; i++ {
id := fmt.Sprintf("%s-%d", b.Name(), i)
container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image))
container, err := client.NewContainer(ctx, id, WithNewSnapshot(id, image), WithSpec(spec))
if err != nil {
b.Error(err)
return