summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/capability_test.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-06-18 14:45:50 -0700
committergVisor bot <gvisor-bot@google.com>2019-06-18 14:46:49 -0700
commitbdb19b82ef2aa1638d98da4b1c55ae7928437f55 (patch)
treee17a3827341aef639e058893c055dc164f1a247d /runsc/cmd/capability_test.go
parent2e1379867a77bfa94cc740b6d1407d3702810c73 (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/cmd/capability_test.go')
-rw-r--r--runsc/cmd/capability_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/runsc/cmd/capability_test.go b/runsc/cmd/capability_test.go
index 79863efa3..3ae25a257 100644
--- a/runsc/cmd/capability_test.go
+++ b/runsc/cmd/capability_test.go
@@ -97,7 +97,12 @@ func TestCapabilities(t *testing.T) {
defer os.RemoveAll(bundleDir)
// Create and start the container.
- c, err := container.Create(testutil.UniqueContainerID(), spec, conf, bundleDir, "", "", "")
+ args := container.Args{
+ ID: testutil.UniqueContainerID(),
+ Spec: spec,
+ BundleDir: bundleDir,
+ }
+ c, err := container.New(conf, args)
if err != nil {
t.Fatalf("error creating container: %v", err)
}