network/tests/tasks
Gris Ge 637e1e6bbe test: Fix profile assertion on Fedora 33
The NetworkManager in Fedora 33 does not use ifcfg-rh plugin by default,
the CI will fail on Fedora 33 with:

```
TASK [assert that profile 'bond0' is present] **********************************
task path: /tmp/tmpaz9m374e/tests/playbooks/tasks/assert_profile_present.yml:4
fatal: [/cache/fedora-33.qcow2]: FAILED! => {
    "assertion": "profile_stat.stat.exists",
    "changed": false,
    "evaluated_to": false,
    "msg": "profile /etc/sysconfig/network-scripts/ifcfg-bond0 does not exist"
}
```

Previously, we are checking the existence of
`/etc/sysconfig/network-scripts/` to determine whether ifcfg-rh plugin
is enabled. This is incorrect on Fedora 33.

The fix is checking the FILENAME[1] used for storing the NetworkManager
connection, the profile is considered as exists when it exists and does
not contains `/run`.

Since we cannot tell which provider we are using, we just check both
initscripts files and NetworkManager connections.

[1]: nmcli -f NAME,FILENAME connection show

Signed-off-by: Gris Ge <fge@redhat.com>
2020-12-16 10:39:13 +08:00
..
provider Forget unmanaged state in NetworkManager 2020-07-11 16:17:06 +02:00
activate_profile.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
assert_device_absent.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
assert_device_present.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
assert_output_in_stderr_without_warnings.yml library: Separate debug and info logs from warnings 2020-05-06 21:57:34 +02:00
assert_profile_absent.yml test: Fix profile assertion on Fedora 33 2020-12-16 10:39:13 +08:00
assert_profile_present.yml test: Fix profile assertion on Fedora 33 2020-12-16 10:39:13 +08:00
cleanup_802_1x_server.yml 802.1x tests: Improve cleanup 2020-06-15 18:26:34 +02:00
cleanup_mock_wifi.yml Add support for wireless connections 2020-06-15 21:10:54 +02:00
cleanup_profile+device.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
create_and_remove_interface.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
create_bridge_profile.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
create_bridge_profile_no_autoconnect.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
create_team_profile.yml Install NetworkManager-team package when team profiles are configured 2020-10-07 11:18:30 +02:00
create_test_interfaces_with_dhcp.yml tests: add simple bond tests for both nm and initscripts 2020-08-20 17:06:05 +02:00
delete_interface.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
get_current_interfaces.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
get_interface_stat.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
get_NetworkManager_NVR.yml tests: Do not check arch for NM version 2020-08-21 08:43:10 +02:00
get_profile_stat.yml test: Fix profile assertion on Fedora 33 2020-12-16 10:39:13 +08:00
manage_test_interface.yml test env: Bring test veth peer up 2020-11-27 16:36:57 +08:00
remove+down_profile.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
remove_profile.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
remove_test_interfaces_with_dhcp.yml tests: add simple bond tests for both nm and initscripts 2020-08-20 17:06:05 +02:00
run_test.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
setup_802.1x.yml Add ca_path option for 802.1x connections 2020-06-15 18:26:34 +02:00
setup_802_1x_server.yml 802.1x tests: Improve cleanup 2020-06-15 18:26:34 +02:00
setup_mock_wifi.yml Add support for wireless connections 2020-06-15 21:10:54 +02:00
setup_test_interface.yml Forget unmanaged state in NetworkManager 2020-07-11 16:17:06 +02:00
show_interfaces.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
test_802.1x_capath.yml test 802.1x: Install openssl as test dependency 2020-11-23 15:55:35 +08:00