diff --git a/anta/tests/routing/generic.py b/anta/tests/routing/generic.py index ff0ae184b..7b916a3bc 100644 --- a/anta/tests/routing/generic.py +++ b/anta/tests/routing/generic.py @@ -190,19 +190,19 @@ class VerifyIPv4RouteType(AntaTest): This test performs the following checks for each IPv4 route: 1. Verifies that the specified VRF is configured. - 2. Verifies that the specified ipv4 route is exists in the configuration. - 3. Verifies that the the specified ipv4 route is of the expected type. + 2. Verifies that the specified IPv4 route is exists in the configuration. + 3. Verifies that the the specified IPv4 route is of the expected type. Expected Results ---------------- * Success: If all of the following conditions are met: - All the specified VRFs are configured. - - All the specified ipv4 routes are found. - - All the specified ipv4 routes are of the expected type. + - All the specified IPv4 routes are found. + - All the specified IPv4 routes are of the expected type. * Failure: If any of the following occur: - A specified VRF is not configured. - - A specified ipv4 route is not found. - - Any specified ipv4 route is not of the expected type. + - A specified IPv4 route is not found. + - Any specified IPv4 route is not of the expected type. Examples -------- @@ -248,11 +248,11 @@ def test(self) -> None: self.result.is_failure(f"{entry} - VRF not configured") continue - # Verifying that the expected ipv4 route is present or not on the device + # Verifying that the expected IPv4 route is present or not on the device if (route_data := routes_details.get(prefix)) is None: - self.result.is_failure(f"{entry} - Routes not found") + self.result.is_failure(f"{entry} - Route not found") continue - # Verifying that the specified ipv4 routes are of the expected type. + # Verifying that the specified IPv4 routes are of the expected type. if expected_route_type != (actual_route_type := route_data.get("routeType")): self.result.is_failure(f"{entry} - Incorrect route type - Expected: {expected_route_type} Actual: {actual_route_type}") diff --git a/docs/api/tests.routing.generic.md b/docs/api/tests.routing.generic.md index 22153ca79..bbc89040a 100644 --- a/docs/api/tests.routing.generic.md +++ b/docs/api/tests.routing.generic.md @@ -10,6 +10,7 @@ anta_title: ANTA catalog for generic routing tests # Tests ::: anta.tests.routing.generic + options: show_root_heading: false show_root_toc_entry: false diff --git a/tests/units/anta_tests/routing/test_generic.py b/tests/units/anta_tests/routing/test_generic.py index 558b1164f..4e9d654dc 100644 --- a/tests/units/anta_tests/routing/test_generic.py +++ b/tests/units/anta_tests/routing/test_generic.py @@ -305,7 +305,7 @@ "expected": {"result": "failure", "messages": ["The following route(s) are missing from the routing table of VRF default: ['10.1.0.2']"]}, }, { - "name": "Success-valid-route-type", + "name": "success-valid-route-type", "test": VerifyIPv4RouteType, "eos_data": [ { @@ -325,14 +325,14 @@ "expected": {"result": "success"}, }, { - "name": "Failure-route-not-found", + "name": "failure-route-not-found", "test": VerifyIPv4RouteType, "eos_data": [{"vrfs": {"default": {"routes": {}}}}], "inputs": {"routes_entries": [{"vrf": "default", "prefix": "10.10.0.1/32", "route_type": "eBGP"}]}, - "expected": {"result": "failure", "messages": ["Prefix: 10.10.0.1/32 VRF: default - Routes not found"]}, + "expected": {"result": "failure", "messages": ["Prefix: 10.10.0.1/32 VRF: default - Route not found"]}, }, { - "name": "Failure-invalid-route-type", + "name": "failure-invalid-route-type", "test": VerifyIPv4RouteType, "eos_data": [{"vrfs": {"default": {"routes": {"10.10.0.1/32": {"routeType": "eBGP"}}}}}], "inputs": {"routes_entries": [{"vrf": "default", "prefix": "10.10.0.1/32", "route_type": "iBGP"}]}, @@ -342,7 +342,7 @@ }, }, { - "name": "Failure-vrf-not-configured", + "name": "failure-vrf-not-configured", "test": VerifyIPv4RouteType, "eos_data": [{"vrfs": {}}], "inputs": {"routes_entries": [{"vrf": "default", "prefix": "10.10.0.1/32", "route_type": "eBGP"}]},