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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user