-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
- name: Get platform monitor docker name | ||
shell: docker ps -a --format '{{'{{'}}.Image{{'}} {{'}}.Names{{'}}'}}' | grep 'platform' | awk '{print $2}' | ||
register: pmon_ps | ||
|
||
- name: Get platform name | ||
shell: show platform summary | grep Platform | awk '{print $2}' | ||
register: platform | ||
|
||
- include_tasks: add_container_to_inventory.yml | ||
- name: run test | ||
include_tasks: roles/test/tasks/pytest_runner.yml | ||
vars: | ||
container_name: "{{ pmon_ps.stdout }}" | ||
|
||
- name: Gather sensors | ||
sensors_facts: checks={{ sensors_checks[platform.stdout] }} | ||
delegate_to: "{{ ansible_host }}_{{ pmon_ps.stdout }}" | ||
|
||
- name: Output of sensors information | ||
debug: var=vars['sensors'] | ||
|
||
- name: Assert no alarm | ||
assert: { that: "{{ vars['sensors']['alarm'] }} == False" } | ||
|
||
- name: Show warnings | ||
debug: var=vars['sensors']['warnings'] | ||
when: vars['sensors']['warning'] | ||
test_node: platform/test_sensors.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
- name: run test | ||
include_tasks: roles/test/tasks/pytest_runner.yml | ||
vars: | ||
test_node: platform/test_sensors.py | ||
../../sonic-common/tasks/sensors_check.yml |