-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Remove suppress-fib-pending CLI and make route_check.py check…
… suppress-fib in BGP configuration" (#3477) Reverts #3331 BGP zebra enhancements is merged to master branch sonic-net/sonic-buildimage#19717 Reverting the revert of bgp suppress pending feature to enable it in master branch
- Loading branch information
1 parent
c4ce5ae
commit ee90681
Showing
6 changed files
with
111 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from click.testing import CliRunner | ||
|
||
import config.main as config | ||
import show.main as show | ||
from utilities_common.db import Db | ||
|
||
|
||
class TestSuppressFibPending: | ||
def test_synchronous_mode(self): | ||
runner = CliRunner() | ||
|
||
db = Db() | ||
|
||
result = runner.invoke(config.config.commands['suppress-fib-pending'], ['enabled'], obj=db) | ||
print(result.output) | ||
assert result.exit_code == 0 | ||
assert db.cfgdb.get_entry('DEVICE_METADATA', 'localhost')['suppress-fib-pending'] == 'enabled' | ||
|
||
result = runner.invoke(show.cli.commands['suppress-fib-pending'], obj=db) | ||
assert result.exit_code == 0 | ||
assert result.output == 'Enabled\n' | ||
|
||
result = runner.invoke(config.config.commands['suppress-fib-pending'], ['disabled'], obj=db) | ||
print(result.output) | ||
assert result.exit_code == 0 | ||
assert db.cfgdb.get_entry('DEVICE_METADATA', 'localhost')['suppress-fib-pending'] == 'disabled' | ||
|
||
result = runner.invoke(show.cli.commands['suppress-fib-pending'], obj=db) | ||
assert result.exit_code == 0 | ||
assert result.output == 'Disabled\n' | ||
|
||
result = runner.invoke(config.config.commands['suppress-fib-pending'], ['invalid-input'], obj=db) | ||
print(result.output) | ||
assert result.exit_code != 0 |