diff options
author | 2019-04-16 18:21:17 +0000 | |
---|---|---|
committer | 2019-04-16 18:21:17 +0000 | |
commit | 2a54fa88a546576581deb1fa57cf85591446bb6a (patch) | |
tree | 708111f7dc82b322e007a2bf77ab99885964e923 | |
parent | 0018ec512d41f3609394414420bbb39deaa0d7e4 (diff) | |
parent | 067437d00057e77eb16eec08fc0d8458f40b6e5d (diff) |
Merge "[VVP] Case-insensitive network role comparison"
-rw-r--r-- | ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml | 2 | ||||
-rw-r--r-- | ice_validator/tests/test_neutron_port_network_attachment.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml index 7c6e4df..620c7c6 100644 --- a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml @@ -40,7 +40,7 @@ resources: - int_intranet_network: + int_INTRANET_network: type: OS::Neutron::Net properties: name: network_name diff --git a/ice_validator/tests/test_neutron_port_network_attachment.py b/ice_validator/tests/test_neutron_port_network_attachment.py index 001d453..dfbad35 100644 --- a/ice_validator/tests/test_neutron_port_network_attachment.py +++ b/ice_validator/tests/test_neutron_port_network_attachment.py @@ -90,7 +90,7 @@ def test_internal_network_parameters(yaml_files): param_network_role = param_match.groupdict().get("network_role") rid_network_role = rid_match.groupdict().get("network_role") - if param_network_role != rid_network_role: + if param_network_role.lower() != rid_network_role.lower(): errors.append(( "The network role ({}) extracted from the resource ID ({}) " "does not match network role ({}) extracted from the " @@ -103,8 +103,8 @@ def test_internal_network_parameters(yaml_files): in {"OS::Neutron::Net", "OS::ContrailV2::VirtualNetwork"}} matches = (INTERNAL_NETWORK_PATTERN.match(n) for n in networks) - roles = {m.groupdict()["network_role"] for m in matches if m} - if param_network_role not in roles: + roles = {m.groupdict()["network_role"].lower() for m in matches if m} + if param_network_role.lower() not in roles: errors.append(( "No internal network with a network role of {} was " "found in the base modules networks: {}" @@ -149,7 +149,7 @@ def test_external_network_parameter(heat_template): continue rid_network_role = rid_match.groupdict()["network_role"] param_network_role = param_match.groupdict()["network_role"] - if rid_network_role != param_network_role: + if rid_network_role.lower() != param_network_role.lower(): errors.append(( "The network role ({}) extracted from the resource ID ({}) " "does not match network role ({}) extracted from the " |