Skip to content

Commit

Permalink
test: Verify DNS and ping still work
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Liang <[email protected]>
  • Loading branch information
liangwen12year authored and Wen Liang committed Feb 6, 2024
1 parent 1214163 commit 0e64478
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/playbooks/tests_bond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
- "{{ port2_profile }}"
- name: "** TEST check polling interval"
command: grep 'Polling Interval'
/proc/net/bonding/{{ controller_device }}
/proc/net/bonding/{{ controller_device }}
register: result
until: "'110' in result.stdout"
changed_when: false
Expand Down Expand Up @@ -123,3 +123,16 @@
when:
- network_provider == "initscripts"
changed_when: false
- name: Verify DNS and ping still work
shell: |
set -euxo pipefail
for host in mirrors.fedoraproject.org mirrors.centos.org; do
if ! getent hosts "$host"; then
exit 1
fi
if ! ping -c5 "$host"; then
exit 1
fi
done
when: ansible_facts["distribution"] == "CentOS"
changed_when: false
13 changes: 13 additions & 0 deletions tests/playbooks/tests_vlan_mtu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,16 @@
include_tasks: tasks/manage_test_interface.yml
vars:
state: absent
- name: Verify DNS and ping still work
shell: |
set -euxo pipefail
for host in mirrors.fedoraproject.org mirrors.centos.org; do
if ! getent hosts "$host"; then
exit 1
fi
if ! ping -c5 "$host"; then
exit 1
fi
done
when: ansible_distribution != 'CentOS'
changed_when: false
13 changes: 13 additions & 0 deletions tests/playbooks/tests_wireless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,16 @@
failed_when: false
- name: Include the task 'cleanup_mock_wifi.yml'
include_tasks: tasks/cleanup_mock_wifi.yml
- name: Verify DNS and ping still work
shell: |
set -euxo pipefail
for host in mirrors.fedoraproject.org mirrors.centos.org; do
if ! getent hosts "$host"; then
exit 1
fi
if ! ping -c5 "$host"; then
exit 1
fi
done
when: ansible_facts["distribution"] == "CentOS"
changed_when: false

0 comments on commit 0e64478

Please sign in to comment.