You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the issue when persistent DVS is used to run pytest which has number of front-panel ports < 32 (#1373)
* Fix the issue where persistent DVS is used to run pytest
and ports are created dynamically (ref pr:
sonic-net/sonic-buildimage#4499). There were two
issues:
a) since number of dynamic front port can be < 32 test case fails
as it expect always 32. Make sure to udpate persitent DVS to always have
32 ports/server link as part of test run and save the current config
db
b) after test is done persistent DVS need to be moved to original state.
Make dure to remove extra port/server link and restore back config db
Signed-off-by: Abhishek Dosi <[email protected]>
* Review Comments fix
Signed-off-by: Abhishek Dosi <[email protected]>
* Added option for force persitent dvs if port < 32
Updated Readme
Signed-off-by: Abhishek Dosi <[email protected]>
* Fix LGTM
Signed-off-by: Abhishek Dosi <[email protected]>
* Fix LGTM and compile error
Signed-off-by: Abhishek Dosi <[email protected]>
* Update tests/conftest.py
Co-authored-by: Danny Allen <[email protected]>
Co-authored-by: Danny Allen <[email protected]>
Copy file name to clipboardExpand all lines: tests/README.md
+6
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,12 @@ For those developing new features for SWSS or the DVS framework, you might find
71
71
```
72
72
sudo pytest --dvsname=vs
73
73
```
74
+
By default if number of ports in persistent DVS < 32 (needed by testbed) then test will be aborted. To overcome that --forcedvs option can be used.
75
+
76
+
```
77
+
sudo pytest --dvsname=vs --forcedvs
78
+
```
79
+
74
80
75
81
5. Additionally, if you need to simulate a specific hardware platform (e.g. Broadcom or Mellanox), you can add this environment variable when starting the DVS container:
0 commit comments