diff options
author | Lantao Liu <lantaol@google.com> | 2018-09-04 13:36:26 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-04 13:37:40 -0700 |
commit | 9ae4e28f75979905a6396962a232e217323499f9 (patch) | |
tree | 2af27d93429e174aae3d05686aac87c897d4252e /runsc/specutils/specutils_test.go | |
parent | 3944cb41cbef64ac507e87f258441000a46424d5 (diff) |
runsc: fix container rootfs path.
PiperOrigin-RevId: 211515350
Change-Id: Ia495af57447c799909aa97bb873a50b87bee2625
Diffstat (limited to 'runsc/specutils/specutils_test.go')
-rw-r--r-- | runsc/specutils/specutils_test.go | 22 |
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 { |