Add default labels to networks and volumes created by Compose
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
e6b2949edc
commit
ba47fb99ba
7 changed files with 68 additions and 10 deletions
17
tests/integration/network_test.py
Normal file
17
tests/integration/network_test.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .testcases import DockerClientTestCase
|
||||
from compose.const import LABEL_NETWORK
|
||||
from compose.const import LABEL_PROJECT
|
||||
from compose.network import Network
|
||||
|
||||
|
||||
class NetworkTest(DockerClientTestCase):
|
||||
def test_network_default_labels(self):
|
||||
net = Network(self.client, 'composetest', 'foonet')
|
||||
net.ensure()
|
||||
net_data = net.inspect()
|
||||
labels = net_data['Labels']
|
||||
assert labels[LABEL_NETWORK] == net.name
|
||||
assert labels[LABEL_PROJECT] == net.project
|
||||
Loading…
Add table
Add a link
Reference in a new issue