#3 Add CI test using the standard test interface
Opened a year ago by mhoyer. Modified a year ago
rpms/ mhoyer/iscsi-initiator-utils master  into  master

file added
+25

@@ -0,0 +1,25 @@ 

+ ---

+ # Tests suitable to run in classic environment

+ - hosts: localhost

+   roles:

+   - role: standard-test-basic

+     # python-stqe cannot be installed on 'atomic', no need to run on 'container'

+     tags:

+     - classic

+     repositories:

+     - repo: "https://gitlab.com/rh-kernel-stqe/python-stqe.git"

+       dest: "python-stqe"

+     tests:

+     # Install python-stqe first

+     - install_stqe:

+         dir: python-stqe

+         run: python3 setup.py install

+     - iscsi-initiator-utils:

+         dir: ./

+         run: stqe-test run -t iscsi/iscsi_params.py

+     required_packages:

+     # required for python-stqe

+     - python3-pyyaml

+     - python3-netifaces

+     - python3-paramiko

+     - python3-augeas

Adds tests according to the CI wiki [0] specifically the standard test interface in the spec [1].

The playbook includes Tier1 level test cases that have been tested in the following contexts and is passing reliably: Classic.
Test logs are stored in the Artifacts directory.

The following steps are used to execute the tests using the standard test interface:

  • Classic
sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS="" TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags classic tests.yml

[0] https://fedoraproject.org/wiki/CI
[1] https://fedoraproject.org/wiki/Changes/InvokingTests

Test Logs: (If you you would like a pointer to the complete log, I can include that as well)

All tests were executed on Fedora Rawhide
* Classic

<snip>
TASK [standard-test-basic : Execute tests] **************
changed: [localhost] => (item={'install_stqe': {'dir': 'python-stqe', 'run': 'python3 setup.py install'}})
changed: [localhost] => (item={'iscsi-initiator-utils': {'dir': './', 'run': 'stqe-test run -t iscsi/iscsi_params.py'}})

TASK [standard-test-basic : Check the results] **************
changed: [localhost]

TASK [standard-test-basic : Set role result] **************
ok: [localhost]

TASK [include_role : str-common-final] **************

TASK [str-common-final : Pull out the logs from test environment to test runner] **************
changed: [localhost]

TASK [str-common-final : Report role result] **************
ok: [localhost] => {
    "msg": [
        "Tests failed: False",
        "Tests msg: ",
        ""
    ]
}

PLAY RECAP **************
localhost                  : ok=20   changed=9    unreachable=0    failed=0
$ cat artifacts/test.log 
PASS install_stqe
PASS iscsi-initiator-utils

Please note it is failing on rawhide atm due to bz#1615258