summaryrefslogtreecommitdiffhomepage
path: root/runsc/container/container_test.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-06-28 09:56:23 -0700
committerShentubot <shentubot@google.com>2018-06-28 09:57:27 -0700
commit8459390cdd81ef1c8180948566e893b06233923c (patch)
tree62966e8519bf3176a0fd1d4e0a4594e640e193e2 /runsc/container/container_test.go
parent1f207de315430fb178b7025a5afd419afdc31449 (diff)
Error out if spec is invalid
Closes #66 PiperOrigin-RevId: 202496258 Change-Id: Ib9287c5bf1279ffba1db21ebd9e6b59305cddf34
Diffstat (limited to 'runsc/container/container_test.go')
-rw-r--r--runsc/container/container_test.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/runsc/container/container_test.go b/runsc/container/container_test.go
index de487ea97..11285a123 100644
--- a/runsc/container/container_test.go
+++ b/runsc/container/container_test.go
@@ -812,28 +812,6 @@ func TestConsoleSocket(t *testing.T) {
}
}
-func TestSpecUnsupported(t *testing.T) {
- spec := testutil.NewSpecWithArgs("/bin/true")
- spec.Process.SelinuxLabel = "somelabel"
-
- // These are normally set by docker and will just cause warnings to be logged.
- spec.Process.ApparmorProfile = "someprofile"
- spec.Linux = &specs.Linux{Seccomp: &specs.LinuxSeccomp{}}
-
- rootDir, bundleDir, conf, err := testutil.SetupContainer(spec)
- if err != nil {
- t.Fatalf("error setting up container: %v", err)
- }
- defer os.RemoveAll(rootDir)
- defer os.RemoveAll(bundleDir)
-
- id := testutil.UniqueContainerID()
- _, err = container.Create(id, spec, conf, bundleDir, "", "", "")
- if err == nil || !strings.Contains(err.Error(), "is not supported") {
- t.Errorf("container.Create() wrong error, got: %v, want: *is not supported, spec.Process: %+v", err, spec.Process)
- }
-}
-
// TestRunNonRoot checks that sandbox can be configured when running as
// non-privileged user.
func TestRunNonRoot(t *testing.T) {