Skip to content
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
25 changes: 25 additions & 0 deletions ansible/roles/test/tasks/restart_swss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- name: Restart swss service
become: true
service:
name: swss
state: restarted

- name: wait for 2 minutes for swss service to recover
pause:
seconds: 120

- name: check basic sanity of the device
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when calling test by name, there is a base_sanity for every single test case which won't recover,
is this duplicate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is duplicate when running a single test.

I intended to create a test to run this test case multiple times, similar to continuous reboot. In that case, checking between individual restarts would be necessary.

include: base_sanity.yml
vars:
recover: false

- name: validate all interfaces are up
include: interface.yml
vars:
recover: false

- name: Restart dhcp_relay service
become: true
service:
name: dhcp_relay
state: restarted
4 changes: 4 additions & 0 deletions ansible/roles/test/vars/testcases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ testcases:
filename: run_config_cleanup.yml
topologies: [t0, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

restart_swss_service:
filename: restart_swss.yml
topologies: [t0, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

sensors:
filename: sensors_check.yml
topologies: [t0, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]
Expand Down