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.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/runsc/specutils/specutils_test.go b/runsc/specutils/specutils_test.go
index 2c4e3e729..64e2172c8 100644
--- a/runsc/specutils/specutils_test.go
+++ b/runsc/specutils/specutils_test.go
@@ -113,6 +113,12 @@ func TestSpecInvalid(t *testing.T) {
Process: &specs.Process{
Args: []string{"/bin/true"},
},
+ Mounts: []specs.Mount{
+ {
+ Source: "src",
+ Destination: "/dst",
+ },
+ },
},
error: "",
},
@@ -197,6 +203,22 @@ func TestSpecInvalid(t *testing.T) {
},
error: "is not supported",
},
+ {
+ name: "relative mount destination",
+ spec: specs.Spec{
+ Root: &specs.Root{Path: "/"},
+ Process: &specs.Process{
+ Args: []string{"/bin/true"},
+ },
+ Mounts: []specs.Mount{
+ {
+ Source: "src",
+ Destination: "dst",
+ },
+ },
+ },
+ error: "must be an absolute path",
+ },
} {
err := ValidateSpec(&test.spec)
if len(test.error) == 0 {