summaryrefslogtreecommitdiffhomepage
path: root/runsc/specutils/specutils_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/specutils/specutils_test.go')
-rw-r--r--runsc/specutils/specutils_test.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/runsc/specutils/specutils_test.go b/runsc/specutils/specutils_test.go
index b61f1ca62..02af6e6ad 100644
--- a/runsc/specutils/specutils_test.go
+++ b/runsc/specutils/specutils_test.go
@@ -219,6 +219,37 @@ func TestSpecInvalid(t *testing.T) {
},
error: "must be an absolute path",
},
+ {
+ name: "invalid mount option",
+ spec: specs.Spec{
+ Root: &specs.Root{Path: "/"},
+ Process: &specs.Process{
+ Args: []string{"/bin/true"},
+ },
+ Mounts: []specs.Mount{
+ {
+ Source: "/src",
+ Destination: "/dst",
+ Type: "bind",
+ Options: []string{"shared"},
+ },
+ },
+ },
+ error: "is not supported",
+ },
+ {
+ name: "invalid rootfs propagation",
+ spec: specs.Spec{
+ Root: &specs.Root{Path: "/"},
+ Process: &specs.Process{
+ Args: []string{"/bin/true"},
+ },
+ Linux: &specs.Linux{
+ RootfsPropagation: "foo",
+ },
+ },
+ error: "root mount propagation option must specify private or slave",
+ },
} {
err := ValidateSpec(&test.spec)
if len(test.error) == 0 {