mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-24 03:17:38 +00:00
In order to guarantee each test is cleaned up properly in the end, it is important to add a post-test check to each test checking that: - Routes and DNS are restored. - Network connectivity to certain hosts are preserved. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
---
|
|
- name: Play for testing team connection
|
|
hosts: all
|
|
vars:
|
|
interface: team0
|
|
profile: "{{ interface }}"
|
|
lsr_fail_debug:
|
|
- __network_connections_result
|
|
tasks:
|
|
- name: Show playbook name
|
|
debug:
|
|
msg: "this is: playbooks/tests_team.yml"
|
|
tags:
|
|
- always
|
|
|
|
- name: Test the team connection
|
|
tags:
|
|
- tests::team:create
|
|
block:
|
|
- name: Include the task 'run_test.yml'
|
|
include_tasks: tasks/run_test.yml
|
|
vars:
|
|
lsr_description: Create a team interface without any port attached
|
|
lsr_setup:
|
|
- tasks/delete_interface.yml
|
|
- tasks/assert_device_absent.yml
|
|
lsr_test:
|
|
- tasks/create_team_profile.yml
|
|
lsr_assert:
|
|
- tasks/assert_profile_present.yml
|
|
- tasks/assert_device_present.yml
|
|
lsr_cleanup:
|
|
- tasks/cleanup_profile+device.yml
|
|
- tasks/check_network_dns.yml
|