ソースを参照

Test that net can be extended

Signed-off-by: Aanand Prasad <[email protected]>
Aanand Prasad 9 年 前
コミット
a9c623fdf2

+ 1 - 0
tests/fixtures/extends/common.yml

@@ -1,6 +1,7 @@
 web:
   image: busybox
   command: /bin/true
+  net: host
   environment:
     - FOO=1
     - BAR=1

+ 1 - 0
tests/fixtures/extends/docker-compose.yml

@@ -11,6 +11,7 @@ myweb:
     BAR: "2"
     # add BAZ
     BAZ: "2"
+  net: bridge
 mydb:
   image: busybox
   command: top

+ 3 - 0
tests/unit/config/config_test.py

@@ -1762,6 +1762,7 @@ class ExtendsTest(unittest.TestCase):
                 'name': 'myweb',
                 'image': 'busybox',
                 'command': 'top',
+                'network_mode': 'bridge',
                 'links': ['mydb:db'],
                 'environment': {
                     "FOO": "1",
@@ -1779,6 +1780,7 @@ class ExtendsTest(unittest.TestCase):
                 'name': 'web',
                 'image': 'busybox',
                 'command': '/bin/true',
+                'network_mode': 'host',
                 'environment': {
                     "FOO": "2",
                     "BAR": "1",
@@ -1797,6 +1799,7 @@ class ExtendsTest(unittest.TestCase):
                 'name': 'myweb',
                 'image': 'busybox',
                 'command': '/bin/true',
+                'network_mode': 'host',
                 'environment': {
                     "FOO": "2",
                     "BAR": "2",