mirror of
https://github.com/moby/moby.git
synced 2025-10-24 09:13:09 +03:00
Migrate network command to cobra
- Migrates network command and subcommands (connect, create, disconnect, inspect, list and remove) to spf13/cobra - Create a RequiredExactArgs helper function for command that require an exact number of arguments. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@@ -379,7 +379,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkCreateLabel(c *check.C) {
|
||||
dockerCmd(c, "network", "create", "--label", testLabel+"="+testValue, testNet)
|
||||
assertNwIsAvailable(c, testNet)
|
||||
|
||||
out, _, err := dockerCmdWithError("network", "inspect", "--format='{{ .Labels."+testLabel+" }}'", testNet)
|
||||
out, _, err := dockerCmdWithError("network", "inspect", "--format={{ .Labels."+testLabel+" }}", testNet)
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(strings.TrimSpace(out), check.Equals, testValue)
|
||||
|
||||
@@ -423,7 +423,7 @@ func (s *DockerSuite) TestDockerNetworkInspect(c *check.C) {
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(networkResources, checker.HasLen, 1)
|
||||
|
||||
out, _ = dockerCmd(c, "network", "inspect", "--format='{{ .Name }}'", "host")
|
||||
out, _ = dockerCmd(c, "network", "inspect", "--format={{ .Name }}", "host")
|
||||
c.Assert(strings.TrimSpace(out), check.Equals, "host")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user