Commit f4b4c2d
authored
sanity check fixes for chassis; and cache cleanup at the end of pytest session (#2958)
Approach
What is the motivation for this PR?
sanity check:
The BGP and interface sanity checks for multi-dut were changed to iterate through all the nodes in a multi-dut setup. However, for a T2 chassis, the multi-dut testbed contains a supervisor card as well, which doesn't have any BGP/PORT configuration. Thus, these checks fail for supervisor card.
cache cleanup:
If we change the inventory file and re-run pytest, the old cached data for the inventory is used instead of picking up the changes.
How did you do it?
sanity_check:
Iterate through frontend_nodes of duthosts instead of all the nodes.
cache cleanup:
Added fixture cleanup_cache_for_session that is called at the beginning of a session to remove the cached facts for all the DUTs in the testbed. This is not an automatic fixture, and is needed in the following scenarios:
Running tests where some 'facts' about the DUT that get cached are changed.
Running tests/regression without running test_pretest which has a test to clean up cache (PR#2978)
Test case development phase to work out testbed information changes.1 parent 4f88aa2 commit f4b4c2d
2 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
0 commit comments