diff --git a/rust/src/lib/ifaces/bond.rs b/rust/src/lib/ifaces/bond.rs index 81f1405e0e..5bb53dd24d 100644 --- a/rust/src/lib/ifaces/bond.rs +++ b/rust/src/lib/ifaces/bond.rs @@ -438,7 +438,7 @@ impl std::fmt::Display for BondFailOverMac { match self { Self::None => "none", Self::Active => "active", - Self::Follow => "follow ", + Self::Follow => "follow", } ) } diff --git a/tests/integration/bond_test.py b/tests/integration/bond_test.py index bd5e885703..f459a798f3 100644 --- a/tests/integration/bond_test.py +++ b/tests/integration/bond_test.py @@ -579,6 +579,21 @@ def test_bond_mac_restriction_in_current_mac_in_desire(eth1_up, eth2_up): ) +@pytest.mark.tier1 +def test_bond_fail_over_mac_follow(eth1_up, eth2_up): + with bond_interface( + name=BOND99, + port=[ETH1, ETH2], + extra_iface_state={ + Bond.CONFIG_SUBTREE: { + Bond.MODE: BondMode.ACTIVE_BACKUP, + Bond.OPTIONS_SUBTREE: {"fail_over_mac": "follow"}, + }, + }, + ) as state: + assertlib.assert_state_match(state) + + @pytest.mark.tier1 def test_create_bond_with_mac(eth1_up, eth2_up): with bond_interface(