From 72266e9f5b65d3865508ab9b6a82a11c1b5f663b Mon Sep 17 00:00:00 2001 From: Sigmund Augdal Date: Mon, 30 Mar 2015 10:31:23 +0200 Subject: [PATCH] Etcd values are stored as strings. Reflect this in the unit tests. --- nova_router/tests/test_iptablesconf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nova_router/tests/test_iptablesconf.py b/nova_router/tests/test_iptablesconf.py index 148e33f..67674e3 100644 --- a/nova_router/tests/test_iptablesconf.py +++ b/nova_router/tests/test_iptablesconf.py @@ -58,12 +58,12 @@ class TestProcessSecurityGroup(object): 'protocol': 'tcp', 'source_type': 'cidr', 'source_cidr': '10.0.0.1/32', - 'destination_port': 22, + 'destination_port': '22', }, ] self.generator.process_security_group("a", "b") self.generator.add_ipset_member.assert_called_with(iptables_configurator.RULES_FROM_CIDR, - "00:11:22:33:44:55", "tcp", 22, + "00:11:22:33:44:55", "tcp", '22', "10.0.0.1/32") @mock.patch('nova_router.security_groups.get_group_members') @@ -77,12 +77,12 @@ class TestProcessSecurityGroup(object): 'id': 1, 'protocol': 'tcp', 'source_type': 'any', - 'destination_port': 22, + 'destination_port': '22', }, ] self.generator.process_security_group("a", "b") self.generator.add_ipset_member.assert_called_with(iptables_configurator.RULES_FROM_ANY, - '00:11:22:33:44:55', 'tcp', 22) + '00:11:22:33:44:55', 'tcp', '22') self.generator.add_ipset_member_family.assert_any_call(iptables_configurator.RULES_FROM_ANY, '00:11:22:33:44:55', 'inet6', ',tcp:22', None, self.generator.addresses_v6) self.generator.add_ipset_member_family.assert_any_call(iptables_configurator.RULES_FROM_ANY, @@ -121,11 +121,11 @@ class TestProcessSecurityGroup(object): 'protocol': 'tcp', 'source_type': 'security_group', 'source_security_group': '1', - 'destination_port': 22, + 'destination_port': '22', }, ] self.generator.process_security_group("a", "b") - self.generator.add_ipset_member.assert_called_with('rls_by_src1', '00:11:22:33:44:55', 'tcp', 22) + self.generator.add_ipset_member.assert_called_with('rls_by_src1', '00:11:22:33:44:55', 'tcp', '22') @mock.patch('nova_router.security_groups.get_group_members') @mock.patch('nova_router.security_groups.get_group_mode') -- 2.22.0