Skip to content

Commit

Permalink
test: improve name text for skipped ostree tests
Browse files Browse the repository at this point in the history
Improve the name text for skipped ostree tests to explain
why the test is skipped.
Add tests/tasks/ostree_systems_check.yml for use by test
playbooks that may be skipped on ostree systems.

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Mar 25, 2024
1 parent 44f937d commit ab77dd1
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 14 deletions.
7 changes: 4 additions & 3 deletions tests/playbooks/tests_team_plugin_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
- name: Play for testing team plugin installation
hosts: all
tasks:
- name: Check if rpm ostree system - cannot test
meta: end_host
when: __network_is_ostree | d(false)
- name: Check if test can run on ostree systems
include_tasks: tasks/ostree_systems_check.yml
vars:
package: NetworkManager-team

- name: Remove the NetworkManager-team package
package:
Expand Down
8 changes: 4 additions & 4 deletions tests/playbooks/tests_wireless_and_network_restart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
tags:
- always

- name: Cannot test ostree systems because the package can not be removed
or installed - 'NetworkManager-wifi'
meta: end_host
when: __network_is_ostree | d(false)
- name: Check if test can run on ostree systems
include_tasks: tasks/ostree_systems_check.yml
vars:
package: NetworkManager-wifi

- name: Test the wifi connection without NetworkManager restarted
tags:
Expand Down
7 changes: 4 additions & 3 deletions tests/playbooks/tests_wireless_plugin_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
- name: Play for testing wireless plugin installation
hosts: all
tasks:
- name: Check if rpm ostree system - cannot test
meta: end_host
when: __network_is_ostree | d(false)
- name: Check if test can run on ostree systems
include_tasks: tasks/ostree_systems_check.yml
vars:
package: NetworkManager-wifi

- name: Remove the NetworkManager-wifi package
package:
Expand Down
6 changes: 6 additions & 0 deletions tests/tasks/ostree_systems_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- name: Cannot test ostree systems because the package cannot be removed
or installed - '{{ package }}'
meta: end_host
when: __network_is_ostree | d(false)
6 changes: 5 additions & 1 deletion tests/tasks/setup_mock_wifi_wpa3_owe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
block:
# It is currently too difficult to install the required kernel
# if using rpm ostree - so just skip this test
- name: Check if rpm ostree system - cannot test
- name: >-
This is an rpm-ostree system. This test cannot be run on such a system.
The test wants to install the hostapd package from copr, and install
the mac80211_hwsim kernel module. These operations are currently not
supported on rpm-ostree systems.
meta: end_host
when: __network_is_ostree | d(false)
Expand Down
6 changes: 5 additions & 1 deletion tests/tasks/setup_mock_wifi_wpa3_sae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
block:
# It is currently too difficult to install the required kernel
# if using rpm ostree - so just skip this test
- name: Check if rpm ostree system - cannot test
- name: >-
This is an rpm-ostree system. This test cannot be run on such a system.
The test wants to install the hostapd package from copr, and install
the mac80211_hwsim kernel module. These operations are currently not
supported on rpm-ostree systems.
meta: end_host
when: __network_is_ostree | d(false)
Expand Down
1 change: 0 additions & 1 deletion tests/tests_team_nm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
import_playbook: playbooks/tests_team.yml
when:
- ansible_distribution_major_version != '6'
- ansible_distribution != 'Fedora'
1 change: 0 additions & 1 deletion tests/tests_wireless_and_network_restart_nm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
import_playbook: playbooks/tests_wireless_and_network_restart.yml
when:
- ansible_distribution_major_version != '6'
- ansible_distribution != 'Fedora'

0 comments on commit ab77dd1

Please sign in to comment.