#1 Add CI tests using the standard test interface
Merged 6 years ago by praiskup. Opened 6 years ago by bgoncalv.
rpms/ bgoncalv/gettext gettext-tests  into  master

file added
+16
@@ -0,0 +1,16 @@ 

+ ---

+ # Tests run on Atomic, Classic and Container

+ - hosts: localhost

+   roles:

+   - role: standard-test-beakerlib

+     tags:

+     - atomic

+     - classic

+     - container

+     repositories:

+     - repo: "https://src.fedoraproject.org/tests/gettext.git"

+       dest: "gettext"

+     tests:

+     - gettext/gettext-tests

+     required_packages:

+     - gettext

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 on Fedora Rawhide: Atomic Host, Docker, and Classic.
Test logs are stored in the Artifacts directory.

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

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

  • Docker
    sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS=docker:docker.io/library/fedora:rawhide TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags container tests.yml

  • 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)

  • Atomic

    <snip>
    TASK [standard-test-beakerlib : Execute beakerlib tests] *****
    changed: [../atomic.qcow2] => (item=gettext-tests)

    TASK [standard-test-beakerlib : Make the master test summary log artifact] *
    changed: [../atomic.qcow2] => (item=gettext-tests)

    TASK [standard-test-beakerlib : Pull out the logs] *****
    changed: [../atomic.qcow2]

    TASK [standard-test-beakerlib : Check the results] *****
    changed: [../atomic.qcow2]

    PLAY [localhost] *********

    TASK [Gathering Facts] *********
    ok: [../atomic.qcow2]

    PLAY RECAP ***********
    ../atomic.qcow2 : ok=14 changed=9 unreachable=0 failed=0

    Test results:

    PASS gettext-tests

  • Docker

    <snip>
    TASK [standard-test-beakerlib : Execute beakerlib tests] *****
    changed: [4db247a841a29d03d4fec3aeaf54b9648439064609996b7852a0c1e597b2f774] => (item=gettext-tests)

    TASK [standard-test-beakerlib : Make the master test summary log artifact] *
    changed: [4db247a841a29d03d4fec3aeaf54b9648439064609996b7852a0c1e597b2f774] => (item=gettext-tests)

    TASK [standard-test-beakerlib : Pull out the logs] *****
    changed: [4db247a841a29d03d4fec3aeaf54b9648439064609996b7852a0c1e597b2f774]

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

    PLAY RECAP ***********
    4db247a841a29d03d4fec3aeaf54b9648439064609996b7852a0c1e597b2f774 : ok=16 changed=11 unreachable=0 failed=0

    Test results:

    PASS gettext-tests

  • Classic

    <snip>
    ==> default: TASK [standard-test-beakerlib : Execute beakerlib tests] ***
    ==> default: changed: [localhost] => (item=gettext-tests)
    ==> default:
    ==> default: TASK [standard-test-beakerlib : Make the master test summary log artifact] *
    ==> default: changed: [localhost] => (item=gettext-tests)
    ==> default:
    ==> default: TASK [standard-test-beakerlib : Pull out the logs]
    *****
    ==> default: changed: [localhost]
    ==> default:
    ==> default: TASK [standard-test-beakerlib : Check the results]
    *****
    ==> default: changed: [localhost]
    ==> default:
    ==> default: PLAY RECAP
    *********
    **
    ==> default: localhost : ok=16 changed=11 unreachable=0 failed=0
    ==> default: ++ '[' 0 -ne 0 ']'
    ==> default: ++ cat /root/gettext/artifacts/test.log
    ==> default: PASS gettext-tests

Hi Bruno, thanks for the PR. Do you plan to support the testsuite?

Hi Pavel, not me, but downstream has a vested interest in making sure this works, but ultimately the decision and maintenance in Fedora dist-git are up to the Fedora maintainer.

I am not in favor of maintaining this, neither . My plan is to leverage the /tests namespace in
pagure (a new thing), and to store the tests in one place (for all the branches
in this package git repo). Would you be OK to modify the pull request here? That would be awesome.

rebased onto 25c66aa

6 years ago

@praiskup I've updated the PR to run the tests that are on tests/gettext name space.

I've tested Fedora Rawhide on Classic, Atomic and Container.

Awesome! Thank you Bruno.

Pull-Request has been merged by praiskup

6 years ago