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

@@ -140,7 +140,7 @@ func TestDaemonRuntimeRoot(t *testing.T) {
}
id := t.Name()
container, err := client.NewContainer(ctx, id, WithNewSpec(oci.WithImageConfig(image), withProcessArgs("top")), WithNewSnapshot(id, image), WithRuntime("io.containerd.runc.v1", &options.Options{
container, err := client.NewContainer(ctx, id, WithNewSnapshot(id, image), WithNewSpec(oci.WithImageConfig(image), withProcessArgs("top")), WithRuntime("io.containerd.runc.v1", &options.Options{
Root: runtimeRoot,
}))
if err != nil {