#1 Add CI tests using the standard test interface
Opened 5 years ago by sturivny. Modified 4 years ago
git://fedorapeople.org/~sturivny/libarchive master  into  master

No commits found

no initial comment

Justification

Adds tests according to the CI wiki specifically the standard test interface in the spec.

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

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


Test environment

Make sure you have installed packages from the spec

$ rpm -q ansible python2-dnf libselinux-python standard-test-roles
ansible-2.3.2.0-1.fc26.noarch
python2-dnf-2.6.3-11.fc26.noarch
libselinux-python-2.6-7.fc26.x86_64
standard-test-roles-2.4-1.fc26.noarch



Clone tests to your PC

$ git clone git://fedorapeople.org/~sturivny/libarchive
$ cd libarchive/



Run tests for Classic

All test should be run under the root

# tests/
# sudo ansible-playbook --tags=classic tests.yml

Snip of the example test run:

TASK [standard-test-beakerlib : Run beakerlib tests] ******************************************************************************************************************************************
changed: [localhost] => (item=Basic-sanity-test-for-libarchive)

TASK [standard-test-beakerlib : Make the master tests summary log artifact] *******************************************************************************************************************
changed: [localhost] => (item=Basic-sanity-test-for-libarchive)

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

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

TASK [standard-test-beakerlib : include_role] *************************************************************************************************************************************************

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] => {
    "failed_when_result": false, 
    "msg": [
        "Tests failed: False", 
        "Tests msg: ", 
        ""
    ]
}

PLAY RECAP ************************************************************************************************************************************************************************************
localhost                  : ok=33   changed=10   unreachable=0    failed=0   



Notes

Tests will be enabled in CI, yet gating is currently disabled, so nothing will change. Tests will run on each dist-git commit, they are not triggered by koji builds and if you are using FMN, it should notify you of failures normally.

The RH QE maintainer contact in case you have questions: Martin Cermak mcermak@redhat.com
The idea is that these tests become yours just as you're maintaining the package, there will, of course, be people around if you have questions or troubles.

Metadata