Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Enhance execution logs in topojson #4852

Merged
merged 1 commit into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def test_next_hop_attribute(request):
dut = "r1"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

# Configure next-hop-self to bgp neighbor
input_dict_1 = {
Expand Down Expand Up @@ -484,7 +485,7 @@ def test_localpref_attribute(request):
"neighbor": {
"r1": {
"dest_link": {
"r3": {
"r2": {
"route_maps": [
{"name": "RMAP_LOCAL_PREF",
"direction": "in"}
Expand All @@ -499,6 +500,7 @@ def test_localpref_attribute(request):
}
}
}

result = create_router_bgp(tgen, topo, input_dict_4)
assert result is True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
Expand Down
34 changes: 16 additions & 18 deletions tests/topotests/bgp-prefix-list-topo1/test_prefix_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ def test_ip_prefix_lists_out_permit(request):
tc_name, result)

result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)
write_test_footer(tc_name)


Expand Down Expand Up @@ -497,8 +497,8 @@ def test_ip_prefix_lists_in_deny_and_permit_any(request):
dut = "r3"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

write_test_footer(tc_name)

Expand Down Expand Up @@ -542,7 +542,6 @@ def test_delete_prefix_lists(request):
result = verify_prefix_lists(tgen, input_dict_2)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
logger.info(result)

# Delete prefix list
input_dict_2 = {
Expand Down Expand Up @@ -714,9 +713,8 @@ def test_ip_prefix_lists_out_deny_and_permit_any(request):
dut = "r4"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)

assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)
write_test_footer(tc_name)


Expand Down Expand Up @@ -859,8 +857,8 @@ def test_modify_prefix_lists_in_permit_to_deny(request):
dut = "r3"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

write_test_footer(tc_name)

Expand Down Expand Up @@ -972,8 +970,8 @@ def test_modify_prefix_lists_in_deny_to_permit(request):
dut = "r3"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

# Modify ip prefix list
input_dict_1 = {
Expand Down Expand Up @@ -1152,8 +1150,8 @@ def test_modify_prefix_lists_out_permit_to_deny(request):
dut = "r4"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

write_test_footer(tc_name)

Expand Down Expand Up @@ -1265,8 +1263,8 @@ def test_modify_prefix_lists_out_deny_to_permit(request):
dut = "r4"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

# Modify ip prefix list
input_dict_1 = {
Expand Down Expand Up @@ -1439,8 +1437,8 @@ def test_ip_prefix_lists_implicit_deny(request):
dut = "r4"
protocol = "bgp"
result = verify_rib(tgen, "ipv4", dut, input_dict_1, protocol=protocol, expected=False)
assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result)
assert result is not True, "Testcase {} : Failed \n Error: Routes still" \
" present in RIB".format(tc_name)

write_test_footer(tc_name)

Expand Down
Loading