Browse Source

ServicePort merge_field should account for external IP and protocol

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 8 years ago
parent
commit
f3c1c8d158
2 changed files with 2 additions and 2 deletions
  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
     def merge_field(self):
-        return (self.target, self.published)
+        return (self.target, self.published, self.external_ip, self.protocol)
 
     def repr(self):
         return dict(

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

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