mirror of https://github.com/docker/cli.git
Add integration test for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
3875355a3e
commit
d05510d954
|
@ -19,8 +19,8 @@ import (
|
|||
"github.com/docker/docker/cli"
|
||||
"github.com/docker/docker/cli/command"
|
||||
servicecmd "github.com/docker/docker/cli/command/service"
|
||||
runconfigopts "github.com/docker/docker/runconfig/opts"
|
||||
"github.com/docker/docker/opts"
|
||||
runconfigopts "github.com/docker/docker/runconfig/opts"
|
||||
"github.com/docker/go-connections/nat"
|
||||
)
|
||||
|
||||
|
@ -85,7 +85,12 @@ func runDeploy(dockerCli *command.DockerCli, opts deployOptions) error {
|
|||
|
||||
ctx := context.Background()
|
||||
namespace := namespace{name: opts.namespace}
|
||||
if err := createNetworks(ctx, dockerCli, config.Networks, namespace); err != nil {
|
||||
|
||||
networks := config.Networks
|
||||
if networks == nil {
|
||||
networks = make(map[string]composetypes.NetworkConfig)
|
||||
}
|
||||
if err := createNetworks(ctx, dockerCli, networks, namespace); err != nil {
|
||||
return err
|
||||
}
|
||||
return deployServices(ctx, dockerCli, config, namespace, opts.sendRegistryAuth)
|
||||
|
|
Loading…
Reference in New Issue