From f3c1c8d15860ecd24635f06550897092e5fd9db1 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 9 Jun 2017 16:58:24 -0700 Subject: [PATCH] ServicePort merge_field should account for external IP and protocol Signed-off-by: Joffrey F --- compose/config/types.py | 2 +- tests/unit/config/config_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/config/types.py b/compose/config/types.py index 6d3ca3f3b..4509bfe67 100644 --- a/compose/config/types.py +++ b/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( diff --git a/tests/unit/config/config_test.py b/tests/unit/config/config_test.py index d92a35c00..87bdd8bca 100644 --- a/tests/unit/config/config_test.py +++ b/tests/unit/config/config_test.py @@ -1865,7 +1865,7 @@ class ConfigTest(unittest.TestCase): { 'target': '1245', 'published': '1245', - 'protocol': 'tcp', + 'protocol': 'udp', } ] }