Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors. Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: 5ab24342258c70438ab8edf708ebc466b1677f38 Component: engine
This commit is contained in:
committed by
Vincent Demeester
parent
d601c75fe5
commit
27d26eeb56
@ -894,7 +894,7 @@ func (s *DockerSuite) TestRunSysctls(c *check.C) {
|
||||
|
||||
runCmd := exec.Command(dockerBinary, "run", "--sysctl", "kernel.foobar=1", "--name", "test2", "busybox", "cat", "/proc/sys/kernel/foobar")
|
||||
out, _, _ = runCommandWithOutput(runCmd)
|
||||
if !strings.Contains(out, "invalid value") {
|
||||
if !strings.Contains(out, "invalid argument") {
|
||||
c.Fatalf("expected --sysctl to fail, got %s", out)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user