Change ACL observation to 0-index and remove weird off-by-one offset

This commit is contained in:
Marek Wolan
2025-02-26 19:31:43 +00:00
parent bab4060378
commit a19ceada2c
4 changed files with 19 additions and 23 deletions

View File

@@ -53,7 +53,7 @@ def test_router_observation():
# Observe the state using the RouterObservation instance
observed_output = router_observation.observe(router.describe_state())
observed_rule = observed_output["ACL"][5]
assert observed_rule["position"] == 4
assert observed_rule["position"] == 5
assert observed_rule["permission"] == 2
assert observed_rule["source_ip_id"] == 2
assert observed_rule["source_wildcard_id"] == 3
@@ -77,7 +77,7 @@ def test_router_observation():
)
observed_output = router_observation.observe(router.describe_state())
observed_rule = observed_output["ACL"][2]
assert observed_rule["position"] == 1
assert observed_rule["position"] == 2
assert observed_rule["permission"] == 1
assert observed_rule["source_ip_id"] == 1
assert observed_rule["source_wildcard_id"] == 1