Skip to content

Commit

Permalink
Revert "Merge pull request docker#9523 from laurazard/add-links-conta…
Browse files Browse the repository at this point in the history
…iner-create"

This reverts commit c64dbbc, reversing
changes made to e90c6ba.

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
  • Loading branch information
glours committed Jun 2, 2022
1 parent d5528f3 commit 8ffccd0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
6 changes: 0 additions & 6 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,6 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
volumesFrom = append(volumesFrom, v[len("container:"):])
}

links, err := s.getLinks(ctx, p.Name, service, number)
if err != nil {
return nil, nil, nil, err
}

securityOpts, err := parseSecurityOpts(p, service.SecurityOpt)
if err != nil {
return nil, nil, nil, err
Expand Down Expand Up @@ -395,7 +390,6 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
Runtime: service.Runtime,
LogConfig: logConfig,
GroupAdd: service.GroupAdd,
Links: links,
}

return &containerConfig, &hostConfig, networkConfig, nil
Expand Down
9 changes: 0 additions & 9 deletions pkg/e2e/fixtures/network-links/compose.yaml

This file was deleted.

21 changes: 1 addition & 20 deletions pkg/e2e/networks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestNetworks(t *testing.T) {
})
}

func TestNetworkAliasses(t *testing.T) {
func TestNetworkAliassesAndLinks(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)

const projectName = "network_alias_e2e"
Expand All @@ -93,25 +93,6 @@ func TestNetworkAliasses(t *testing.T) {
})
}

func TestNetworkLinks(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)

const projectName = "network_link_e2e"

t.Run("up", func(t *testing.T) {
c.RunDockerComposeCmd("-f", "./fixtures/network-links/compose.yaml", "--project-name", projectName, "up", "-d")
})

t.Run("curl links in default bridge network", func(t *testing.T) {
res := c.RunDockerComposeCmd("-f", "./fixtures/network-links/compose.yaml", "--project-name", projectName, "exec", "-T", "container2", "curl", "http://container1/")
assert.Assert(t, strings.Contains(res.Stdout(), "Welcome to nginx!"), res.Stdout())
})

t.Run("down", func(t *testing.T) {
_ = c.RunDockerComposeCmd("--project-name", projectName, "down")
})
}

func TestIPAMConfig(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)

Expand Down

0 comments on commit 8ffccd0

Please sign in to comment.