anaconda/tests
Radek Vykydal 1471316eac Import Anaconda functional tests from RHEL 8
Related: rhbz#1961087
2021-06-28 16:27:19 +02:00
..
.fmf Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
linchpin Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
remote_config Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
roles Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
check_and_set_remote_user.yml Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
prepare-test-runner.yml Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
provision.fmf Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
README.md Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
run_tests_remotely.sh Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
set_tests_to_run_on_remote.yml Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
tests.yml Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00
vars_tests.yml Import Anaconda functional tests from RHEL 8 2021-06-28 16:27:19 +02:00

Anaconda installer gating tests.

Additionally to the tests (tests*.yml) contains also playbooks for runnning the tests from localhost on a remote test runner. The runner can be provisioned by linchpin. See run_tests_remotely.sh script as an example of the playbooks usage.

Running the tests remotely

Test runner

The remote test runner can be provided in any way. To be used by the playbooks:

  • It has to allow ssh access as a remote user which is allowed to become root, using the ssh key configured by private_key_file in ansible config. By default the remote_user for running the tests is root.
  • Test runner host name / IP should be configured for the playbooks in gating_test_runner group of remote_config/inventory.

The runner can be provisioned in a cloud by linchpin as in the script:

  • The cloud credentials need to be configured in the file and profile reffered by credentials variable of topology. So the credentials file clouds.yml should contain profile ci-rhos. The file can be placed to ~/.config/linchpin directory or the directory containing the file can be set by linchpin --creds-path option.
  • The ssh key is set by keypair value of linchpin topology file. It should correspond to the key defined in ansible config. The topology file also defines image to be used for test runner.
  • The script populates the inventory for playbooks with inventory generated by linchpin.
  • The script tries to find out which remote user should be used (root, fedora, cloud-user) and updates ansible config with the value.

Test runner environment

Test runner environment is prepared by prepare-test-runner.yml playbook:

  • It is possible to add repositories to the runner by defining test_runner_repos variable. It can be useful for example for adding a repository with scratch build to be tested or adding repositories for test dependencies missing on remote runner.
  • Empty directory for storing test artifacts is created on test runner based on the artifacts variable.

Test playbooks configuration

Running on the remote runner:

Normally the testing system runs all the tests*.yml playbooks.

WARNING: The test playbooks are run on localhost (test runner provided by the testing system). They change the test runner environment (eg install packages) so most probably you don't want to run them as they are - on your local host. The script updates hosts value of the test playbooks to use remote host from gating_test_runner group as test runner (using a playbook). If you want to run the tests playbooks separately make sure the hosts variable in the test playbook is set to remote test runner (eg. gating_test_runner).

The test playbooks need artifacts variable supplied as can be seen in the script. (Normally testing system takes care of this.)

Installation repositories:

Repositories (base and additional) used for installation test are defined in repos configuration. Their URL can be either defined explicitly or looked up in specified repositories of the test runner.

dirinstall test

There is a text and a vnc variant of dirinstall test. Both will run all the kickstarts found in roles/dirinstall/templates/kickstarts.

The results

The results and logs are fetched from remote host into local host directory defined by artifacts variable passed to the playbooks. This value can be passed also to the script with -a option.