diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-06-18 14:45:50 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-18 14:46:49 -0700 |
commit | bdb19b82ef2aa1638d98da4b1c55ae7928437f55 (patch) | |
tree | e17a3827341aef639e058893c055dc164f1a247d /runsc/container/shared_volume_test.go | |
parent | 2e1379867a77bfa94cc740b6d1407d3702810c73 (diff) |
Add Container/Sandbox args struct for creation
There were 3 string arguments that could be easily misplaced
and it makes it easier to add new arguments, especially for
Container that has dozens of callers.
PiperOrigin-RevId: 253872074
Diffstat (limited to 'runsc/container/shared_volume_test.go')
-rw-r--r-- | runsc/container/shared_volume_test.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/runsc/container/shared_volume_test.go b/runsc/container/shared_volume_test.go index 51a7f99df..1f90d2462 100644 --- a/runsc/container/shared_volume_test.go +++ b/runsc/container/shared_volume_test.go @@ -52,7 +52,12 @@ func TestSharedVolume(t *testing.T) { defer os.RemoveAll(bundleDir) // Create and start the container. - c, err := Create(testutil.UniqueContainerID(), spec, conf, bundleDir, "", "", "") + args := Args{ + ID: testutil.UniqueContainerID(), + Spec: spec, + BundleDir: bundleDir, + } + c, err := New(conf, args) if err != nil { t.Fatalf("error creating container: %v", err) } @@ -206,7 +211,12 @@ func TestSharedVolumeFile(t *testing.T) { defer os.RemoveAll(bundleDir) // Create and start the container. - c, err := Create(testutil.UniqueContainerID(), spec, conf, bundleDir, "", "", "") + args := Args{ + ID: testutil.UniqueContainerID(), + Spec: spec, + BundleDir: bundleDir, + } + c, err := New(conf, args) if err != nil { t.Fatalf("error creating container: %v", err) } |