Skip to content

Commit

Permalink
bond: fix fail_over_mac follow mode
Browse files Browse the repository at this point in the history
There was a trailing whitespace on the Display implementation of the
BondFailOverMac enum.

Integration test case added.

https://bugzilla.redhat.com/show_bug.cgi?id=2091775

Signed-off-by: Fernando Fernandez Mancera <[email protected]>
  • Loading branch information
ffmancera authored and cathay4t committed Jun 28, 2022
1 parent 5fa085a commit 628aa72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/lib/ifaces/bond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl std::fmt::Display for BondFailOverMac {
match self {
Self::None => "none",
Self::Active => "active",
Self::Follow => "follow ",
Self::Follow => "follow",
}
)
}
Expand Down
15 changes: 15 additions & 0 deletions tests/integration/bond_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 628aa72

Please sign in to comment.