Commit 2935a67883 for frr
commit 2935a67883f8504aa23766a3d49eb26855a17df8
Author: Carmine Scarpitta <cscarpit@cisco.com>
Date: Wed Nov 11 18:25:11 2026 -0500
Revert "tests: expect the color check of set extcommunity color"
Topotest bgp_extcommunity_invalid_config is consistently failing on
master.
#24276 changed the test to expect the color-specific error introduced
by #24103. Since #24103 has been reverted, the topotest no longer gets
the expected error.
Revert #24276.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
diff --git a/tests/topotests/bgp_extcommunity_invalid_config/test_bgp_extcommunity_invalid_config.py b/tests/topotests/bgp_extcommunity_invalid_config/test_bgp_extcommunity_invalid_config.py
index 08c45b9319..bcb878fdaa 100644
--- a/tests/topotests/bgp_extcommunity_invalid_config/test_bgp_extcommunity_invalid_config.py
+++ b/tests/topotests/bgp_extcommunity_invalid_config/test_bgp_extcommunity_invalid_config.py
@@ -52,7 +52,7 @@ EXPECTED_SET_CLAUSES = {
# The rt, soo and nt values are plain strings in the YANG model, so only
# the northbound validation callback can reject them. The color value
# matches the YANG color-list pattern (it is read as "01:100" followed by
-# "01:5"), but the command checks each color itself and rejects it first.
+# "01:5"), so it also gets as far as the validation callback.
MALFORMED_SET_VALUES = [
("rt", "1.2.3"),
("rt", "100"),
@@ -175,13 +175,6 @@ def test_bgp_extcommunity_initial_config():
assert result is None, "Initial configuration not loaded: {}".format(result)
-def _set_malformed_message(kind, value):
- "The error a malformed set extcommunity value is rejected with."
- if kind == "color":
- return "Malformed color extended community {}".format(value)
- return "Malformed extcommunity {} value".format(kind)
-
-
@pytest.mark.parametrize("seq", [10, 20], ids=["existing-rule", "no-rule"])
@pytest.mark.parametrize(
"kind,value",
@@ -208,7 +201,7 @@ def test_bgp_route_map_set_extcommunity_malformed(kind, value, seq):
assert rc != 0, "{} was accepted (exit status 0):\n{}".format(what, output)
assert (
- _set_malformed_message(kind, value) in output
+ "Malformed extcommunity {} value".format(kind) in output
), "{} was not rejected by validation:\n{}".format(what, output)
_check_unchanged(r1, baseline, what)