Skip to content

Commit

Permalink
[test case] Add test: restart swss service (#483)
Browse files Browse the repository at this point in the history
* [test case] Add test: restart swss service

There was a script to restart swss, it was used as utility by a
few other tests. And it didn't wait long enough for swss service
to recover, it didn't check if the system recovered eventually.

This test also restarts dhcp_relay service to make sure that it
will listen on right interfaces. So the system would be left at
a healthy state.

* [swss restart] change wording
  • Loading branch information
yxieca authored Feb 24, 2018
1 parent 020c4a8 commit 415755d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
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
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 @@ -158,6 +158,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

0 comments on commit 415755d

Please sign in to comment.