Remove ability to join bridge network + user-defined networks
Containers connected to the bridge network can't have aliases, so it's simpler to rule that they can *either* be connected to the bridge network (via `network_mode: bridge`) *or* be connected to user-defined networks (via `networks` or the default network). Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
16ef3d0eb8
commit
297d20f085
3 changed files with 6 additions and 30 deletions
|
|
@ -495,22 +495,6 @@ class CLITestCase(DockerClientTestCase):
|
|||
|
||||
assert 'Service "web" uses an undefined network "foo"' in result.stderr
|
||||
|
||||
@v2_only()
|
||||
def test_up_with_bridge_network_plus_default(self):
|
||||
filename = 'bridge.yml'
|
||||
|
||||
self.base_dir = 'tests/fixtures/networks'
|
||||
self._project = get_project(self.base_dir, [filename])
|
||||
|
||||
self.dispatch(['-f', filename, 'up', '-d'], None)
|
||||
|
||||
container = self.project.containers()[0]
|
||||
|
||||
assert sorted(list(container.get('NetworkSettings.Networks'))) == sorted([
|
||||
'bridge',
|
||||
self.project.default_network.full_name,
|
||||
])
|
||||
|
||||
@v2_only()
|
||||
def test_up_with_network_mode(self):
|
||||
c = self.client.create_container('busybox', 'top', name='composetest_network_mode_container')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue