瀏覽代碼

ServicePort merge_field should account for external IP and protocol

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 8 年之前
父節點
當前提交
f3c1c8d158
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      compose/config/types.py
  2. 1 1
      tests/unit/config/config_test.py

+ 1 - 1
compose/config/types.py

@@ -325,7 +325,7 @@ class ServicePort(namedtuple('_ServicePort', 'target published protocol mode ext
 
 
     @property
     @property
     def merge_field(self):
     def merge_field(self):
-        return (self.target, self.published)
+        return (self.target, self.published, self.external_ip, self.protocol)
 
 
     def repr(self):
     def repr(self):
         return dict(
         return dict(

+ 1 - 1
tests/unit/config/config_test.py

@@ -1865,7 +1865,7 @@ class ConfigTest(unittest.TestCase):
                 {
                 {
                     'target': '1245',
                     'target': '1245',
                     'published': '1245',
                     'published': '1245',
-                    'protocol': 'tcp',
+                    'protocol': 'udp',
                 }
                 }
             ]
             ]
         }
         }