You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNINGS:
nautobot_firewall_models.IPRange: (models.W036) MySQL does not support unique constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you don't care about it.
System check identified 1 issue (0 silenced).
.....................................................................................................................................................................................................................................................................................................ss...........................................................................................................................................................................................s..........F.FFFF........F...F.......................F.F............................................s...s...................................s...s...................................s...s...................................s...s............s.s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s...................................s...s.
======================================================================
FAIL: test_capirca_conversion (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_capirca_conversion)
Verify that generating full config for a polucy is as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 623, in test_capirca_conversion
self.assertEqual(cap_obj.pol_file, POLICY2)
AssertionError: 'head[26 chars]zone all to-zone all\n}\n\nterm Test {\n acti[428 chars]n}\n' != 'head[26 chars]zone DMZ to-zone WAN\n}\n\nterm Policy-Rule-1 [428 chars]n}\n'
Diff is 679 characters long. Set self.maxDiff to None to see it.
======================================================================
FAIL: test_policy_chd (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_policy_chd)
Test ability to inject custom headers.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 558, in test_policy_chd
self.assertIn("unique-value", pol[1]["headers"])
AssertionError: 'unique-value' not found in ['srx', 'from-zone', 'DMZ', 'to-zone', 'WAN']
======================================================================
FAIL: test_policy_chd_allow_list (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_policy_chd_allow_list)
Test headers can be allowed and not allowed based on custom field.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 574, in test_policy_chd_allow_list
self.assertIn("unique-value", pol[1]["headers"])
AssertionError: 'unique-value' not found in ['srx', 'from-zone', 'DMZ', 'to-zone', 'WAN']
======================================================================
FAIL: test_policy_ctd (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_policy_ctd)
Test ability to inject custom terms.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 565, in test_policy_ctd
self.assertIn("test-custom", pol[1]["terms"])
AssertionError: 'test-custom' not found in {'source-address': ['addr-group1', 'printer'], 'source-port': ['Source-HTTPS'], 'destination-address': ['addr-group3', 'server'], 'destination-port': ['PGSQL', 'svc-group1'], 'protocol': ['tcp'], 'action': 'deny', 'logging': 'true', 'comment': '"req1"'}
======================================================================
FAIL: test_policy_ctd_allow_list (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_policy_ctd_allow_list)
Test terms can be allowed and not allowed based on custom field.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 584, in test_policy_ctd_allow_list
self.assertIn("test-custom", pol[1]["terms"])
AssertionError: 'test-custom' not found in {'source-address': ['addr-group1', 'printer'], 'source-port': ['Source-HTTPS'], 'destination-address': ['addr-group3', 'server'], 'destination-port': ['PGSQL', 'svc-group1'], 'protocol': ['tcp'], 'action': 'deny', 'logging': 'true', 'comment': '"req1"'}
======================================================================
FAIL: test_svcs_multi_proto_no_port (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_svcs_multi_proto_no_port)
Check that you can mix and match tcp/udp with other protocols, as long as no port.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 511, in test_svcs_multi_proto_no_port
self.assertEqual(len(pol[1]["terms"]["destination-port"]), 0)
AssertionError: 2 != 0
======================================================================
FAIL: test_validate_policy_data (nautobot_firewall_models.tests.test_capirca.TestPolicyToCapirca.test_validate_policy_data)
Test validate_policy_data produces consistent results.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_capirca.py", line 591, in test_validate_policy_data
self.assertEqual(cap_obj.policy, POLICY_DATA)
AssertionError: Lists differ: [{'rule-name': 'Test', 'source-address': [], 'source-grou[787 chars] {}}] != [{'rule-name': 'Policy Rule 1', 'source-address': ['print[787 chars] {}}]
First differing element 0:
{'rule-name': 'Test', 'source-address': [], 'source-grou[317 chars]: {}}
{'rule-name': 'Policy Rule 1', 'source-address': ['print[406 chars]: {}}
Diff is 1578 characters long. Set self.maxDiff to None to see it.
======================================================================
FAIL: test_policy_to_json (nautobot_firewall_models.tests.test_models.TestNATPolicyModels.test_policy_to_json)
Test method to_json on Policy model.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_models.py", line 330, in test_policy_to_json
self.assertEqual(json_details["name"], "NAT Policy Rule 1.1")
AssertionError: 'NAT Policy Rule 2.1' != 'NAT Policy Rule 1.1'
- NAT Policy Rule 2.1
? ^
+ NAT Policy Rule 1.1
? ^
======================================================================
FAIL: test_natpolicyrule_to_json (nautobot_firewall_models.tests.test_models.TestNATPolicyRuleModels.test_natpolicyrule_to_json)
Test method to_json on NATPolicyRule model.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/source/nautobot_firewall_models/tests/test_models.py", line 300, in test_natpolicyrule_to_json
self.assertEqual(json_details["display"], "NAT Policy Rule 1.1 - req1")
AssertionError: 'NAT Policy Rule 2.1 - req3' != 'NAT Policy Rule 1.1 - req1'
- NAT Policy Rule 2.1 - req3
? ^ ^
+ NAT Policy Rule 1.1 - req1
? ^ ^
----------------------------------------------------------------------
Ran 1163 tests in 278.619s
FAILED (failures=9, skipped=35)
This could have something to do with MySQL not able to honor the uniqueness constraint.
The text was updated successfully, but these errors were encountered:
Environment
Expected Behavior
Unittests are run in CI and pass.
Observed Behavior
Enabling the MySQL tests will fail in the CI.
Steps to Reproduce
The tests currently fail the following tests:
This could have something to do with MySQL not able to honor the uniqueness constraint.
The text was updated successfully, but these errors were encountered: