Skip to content

Commit

Permalink
test: Split the task for checking routes and DNS
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Liang <[email protected]>
  • Loading branch information
liangwen12year committed Feb 13, 2024
1 parent 76b3ba0 commit fbed9a7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/tasks/check_network_dns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,27 @@
# This is typically used after cleanup, to verify that cleanup
# worked and left networking in the default state - sort of like
# a post-condition, or pre-condition for subsequent tests
- name: Verify DNS and ping still work
- name: Check routes and DNS
shell: |
set -euo pipefail
echo IP
ip a
echo IP ROUTE
ip route
echo IP -6 ROUTE
ip -6 route
echo RESOLV
if [ -f /etc/resolv.conf ]; then
cat /etc/resolv.conf
else
echo NO /etc/resolv.conf
ls -alrtF /etc/resolv.* || :
ls -alrtF /etc/resolv.* || :_
fi
changed_when: false

- name: Verify DNS and ping still work
shell: |
set -euo pipefail
echo CHECK DNS AND CONNECTIVITY
for host in mirrors.fedoraproject.org mirrors.centos.org; do
if ! getent hosts "$host"; then
Expand Down

0 comments on commit fbed9a7

Please sign in to comment.