diff options
| author | Kuldeep Kashyap <kashyapk@vmware.com> | 2020-04-01 05:30:38 +0000 |
|---|---|---|
| committer | Kuldeep Kashyap <kashyapk@vmware.com> | 2020-04-09 09:23:59 +0000 |
| commit | afee014eda2989806d1c581940d4d11252a7a14a (patch) | |
| tree | bca64ea13ab342929476d9fd25dfd354c89ee775 /tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py | |
| parent | 089f79edd4317bd65ab1faefb129f80d7cb72066 (diff) | |
tests: Added new tests to bgp-basic-functionality-topo1
1. Added 2 new test cases to bgp-basic-functionality-topo1
2. Enhanced 2 tests to run for both static routes and network advvertise command
Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
Diffstat (limited to 'tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py')
| -rwxr-xr-x | tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py | 61 |
1 files changed, 13 insertions, 48 deletions
diff --git a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py index 1b2faa601a..3441d68731 100755 --- a/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py +++ b/tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py @@ -243,7 +243,7 @@ def test_BGP_config_with_invalid_ASN_p2(request): global BGP_CONVERGENCE if BGP_CONVERGENCE != True: - pytest.skip('skipped because of BGP Convergence failure') + pytest.skip("skipped because of BGP Convergence failure") # test case name tc_name = request.node.name @@ -251,26 +251,10 @@ def test_BGP_config_with_invalid_ASN_p2(request): # Api call to modify AS number input_dict = { - "r1": { - "bgp":{ - "local_as": 0, - } - }, - "r2": { - "bgp":{ - "local_as": 0, - } - }, - "r3": { - "bgp":{ - "local_as": 0, - } - }, - "r4": { - "bgp":{ - "local_as": 64000, - } - } + "r1": {"bgp": {"local_as": 0,}}, + "r2": {"bgp": {"local_as": 0,}}, + "r3": {"bgp": {"local_as": 0,}}, + "r4": {"bgp": {"local_as": 64000,}}, } result = modify_as_number(tgen, topo, input_dict) try: @@ -291,7 +275,7 @@ def test_BGP_config_with_2byteAS_and_4byteAS_number_p1(request): global BGP_CONVERGENCE if BGP_CONVERGENCE != True: - pytest.skip('skipped because of BGP Convergence failure') + pytest.skip("skipped because of BGP Convergence failure") # test case name tc_name = request.node.name @@ -299,42 +283,23 @@ def test_BGP_config_with_2byteAS_and_4byteAS_number_p1(request): # Api call to modify AS number input_dict = { - "r1": { - "bgp":{ - "local_as": 131079 - } - }, - "r2": { - "bgp":{ - "local_as": 131079 - } - }, - "r3": { - "bgp":{ - "local_as": 131079 - } - }, - "r4": { - "bgp":{ - "local_as": 111 - } - } + "r1": {"bgp": {"local_as": 131079}}, + "r2": {"bgp": {"local_as": 131079}}, + "r3": {"bgp": {"local_as": 131079}}, + "r4": {"bgp": {"local_as": 111}}, } result = modify_as_number(tgen, topo, input_dict) if result != True: - assert False, "Testcase " + tc_name + " :Failed \n Error: {}".\ - format(result) + assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result) result = verify_as_numbers(tgen, topo, input_dict) if result != True: - assert False, "Testcase " + tc_name + " :Failed \n Error: {}".\ - format(result) + assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result) # Api call verify whether BGP is converged result = verify_bgp_convergence(tgen, topo) if result != True: - assert False, "Testcase " + tc_name + " :Failed \n Error: {}".\ - format(result) + assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result) write_test_footer(tc_name) |
