Remove integration-cli/docker_cli_create_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
2e8ccbb49e
commit
8331a1a5cf
1 changed files with 0 additions and 43 deletions
|
@ -1,43 +0,0 @@
|
|||
// +build !windows
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
// Test case for #30166 (target was not validated)
|
||||
func (s *DockerSuite) TestCreateTmpfsMountsTarget(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
type testCase struct {
|
||||
target string
|
||||
expectedError string
|
||||
}
|
||||
cases := []testCase{
|
||||
{
|
||||
target: ".",
|
||||
expectedError: "mount path must be absolute",
|
||||
},
|
||||
{
|
||||
target: "foo",
|
||||
expectedError: "mount path must be absolute",
|
||||
},
|
||||
{
|
||||
target: "/",
|
||||
expectedError: "destination can't be '/'",
|
||||
},
|
||||
{
|
||||
target: "//",
|
||||
expectedError: "destination can't be '/'",
|
||||
},
|
||||
}
|
||||
for _, x := range cases {
|
||||
out, _, _ := dockerCmdWithError("create", "--tmpfs", x.target, "busybox", "sh")
|
||||
if x.expectedError != "" && !strings.Contains(out, x.expectedError) {
|
||||
c.Fatalf("mounting tmpfs over %q should fail with %q, but got %q",
|
||||
x.target, x.expectedError, out)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue