Adds tests according to the CI
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. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
Snip of the example test run for Classic tests:
```
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
wide-dhcpv6-20080615-13.1.fc28.6.x86_64
:: [ 15:51:23 ] :: [ PASS ] :: Checking for the presence of wide-dhcpv6 rpm
:: [ 15:51:23 ] :: [ LOG ] :: Package versions:
:: [ 15:51:23 ] :: [ LOG ] :: wide-dhcpv6-20080615-13.1.fc28.6.x86_64
:: [ 15:51:23 ] :: [ BEGIN ] :: Running 'cp /etc/resolv.conf /tmp/resolv.conf'
:: [ 15:51:24 ] :: [ PASS ] :: Command 'cp /etc/resolv.conf /tmp/resolv.conf' (Expected 0, got 0)
:: [ 15:51:24 ] :: [ BEGIN ] :: Running 'chattr +i /etc/resolv.conf'
:: [ 15:51:24 ] :: [ PASS ] :: Command 'chattr +i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:51:24 ] :: [ BEGIN ] :: Running 'cp dhcp6s-tests.py /usr/bin/'
:: [ 15:51:24 ] :: [ PASS ] :: Command 'cp dhcp6s-tests.py /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 1s
:: Assertions: 4 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:51:24 ] :: [ LOG ] :: Starting dhcp6s tests ...
:: [ 15:51:24 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/dhcp6s-tests.py'
test_dhcp6s_assigns_static_address_using_duid1 (__main__.Dhcp6sTests)
DHCP6S assigns same (static) addresses to same hosts using known DUID values ... /usr/sbin/dhclient-script: line 706: /etc/resolv.conf: Operation not permitted
ok
test_dhcp6s_assigns_static_address_using_duid2 (__main__.Dhcp6sTests)
DHCP6S assigns same (static) addresses to same hosts using known DUID values ... /usr/sbin/dhclient-script: line 706: /etc/resolv.conf: Operation not permitted
ok
----------------------------------------------------------------------
Ran 2 tests in 41.885s
OK
:: [ 15:52:06 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/dhcp6s-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 42s
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:06 ] :: [ BEGIN ] :: Running 'rm /usr/bin/dhcp6s-tests.py'
:: [ 15:52:06 ] :: [ PASS ] :: Command 'rm /usr/bin/dhcp6s-tests.py' (Expected 0, got 0)
:: [ 15:52:06 ] :: [ BEGIN ] :: Running 'chattr -i /etc/resolv.conf'
:: [ 15:52:06 ] :: [ PASS ] :: Command 'chattr -i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:06 ] :: [ BEGIN ] :: Running 'cp /tmp/resolv.conf /etc/resolv.conf'
:: [ 15:52:06 ] :: [ PASS ] :: Command 'cp /tmp/resolv.conf /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:06 ] :: [ LOG ] :: dhcp6s tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 3 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Package : wide-dhcpv6
Installed : wide-dhcpv6-20080615-13.1.fc28.6.x86_64
beakerlib RPM : beakerlib-1.17-13.fc28.noarch
Test started : 2018-05-20 15:51:23 IST
Test finished : 2018-05-20 15:52:06 IST (still running)
Test duration : 43 seconds
Test name : unknown
Distro : Fedora release 28 (Twenty Eight)
Hostname : Zeus
Architecture : x86_64
CPUs : 8 x Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
RAM size : 15731 MB
HDD size : 226.83 GB
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:51:23 ] :: [ PASS ] :: Checking for the presence of wide-dhcpv6 rpm
:: [ 15:51:23 ] :: [ LOG ] :: Package versions:
:: [ 15:51:23 ] :: [ LOG ] :: wide-dhcpv6-20080615-13.1.fc28.6.x86_64
:: [ 15:51:24 ] :: [ PASS ] :: Command 'cp /etc/resolv.conf /tmp/resolv.conf' (Expected 0, got 0)
:: [ 15:51:24 ] :: [ PASS ] :: Command 'chattr +i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:51:24 ] :: [ PASS ] :: Command 'cp dhcp6s-tests.py /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 1s
:: Assertions: 4 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:51:24 ] :: [ LOG ] :: Starting dhcp6s tests ...
:: [ 15:52:06 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/dhcp6s-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 42s
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:06 ] :: [ PASS ] :: Command 'rm /usr/bin/dhcp6s-tests.py' (Expected 0, got 0)
:: [ 15:52:06 ] :: [ PASS ] :: Command 'chattr -i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:06 ] :: [ PASS ] :: Command 'cp /tmp/resolv.conf /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:06 ] :: [ LOG ] :: dhcp6s tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 3 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: unknown
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:06 ] :: [ LOG ] :: JOURNAL XML: /var/tmp/beakerlib-tySdC9q/journal.xml
:: [ 15:52:06 ] :: [ LOG ] :: JOURNAL TXT: /var/tmp/beakerlib-tySdC9q/journal.txt
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 43s
:: Phases: 3 good, 0 bad
:: OVERALL RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
wide-dhcpv6-20080615-13.1.fc28.6.x86_64
:: [ 15:52:27 ] :: [ PASS ] :: Checking for the presence of wide-dhcpv6 rpm
:: [ 15:52:27 ] :: [ LOG ] :: Package versions:
:: [ 15:52:27 ] :: [ LOG ] :: wide-dhcpv6-20080615-13.1.fc28.6.x86_64
:: [ 15:52:27 ] :: [ BEGIN ] :: Running 'cp dhcp6c-tests.py /usr/bin/'
:: [ 15:52:27 ] :: [ PASS ] :: Command 'cp dhcp6c-tests.py /usr/bin/' (Expected 0, got 0)
:: [ 15:52:27 ] :: [ BEGIN ] :: Running 'chattr +i /etc/resolv.conf'
:: [ 15:52:27 ] :: [ PASS ] :: Command 'chattr +i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:27 ] :: [ BEGIN ] :: Running 'cp /var/db/dhcp6c_duid /var/run/'
:: [ 15:52:27 ] :: [ PASS ] :: Command 'cp /var/db/dhcp6c_duid /var/run/' (Expected 0, got 0)
:: [ 15:52:27 ] :: [ BEGIN ] :: Running 'cp dhcp6c_duid /var/db/'
:: [ 15:52:27 ] :: [ PASS ] :: Command 'cp dhcp6c_duid /var/db/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 5 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:27 ] :: [ LOG ] :: Starting dhcp6c tests ...
:: [ 15:52:27 ] :: [ BEGIN ] :: Running '/usr/bin/python3 /usr/bin/dhcp6c-tests.py'
test_dhcp6s_assigns_static_address_using_duid (__main__.Dhcp6cTests)
DHCP6c gets the (static) addresses to hosts using known DUID values ... ok
----------------------------------------------------------------------
Ran 1 test in 25.096s
OK
:: [ 15:52:52 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/dhcp6c-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 25s
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:52 ] :: [ BEGIN ] :: Running 'rm /usr/bin/dhcp6c-tests.py'
:: [ 15:52:52 ] :: [ PASS ] :: Command 'rm /usr/bin/dhcp6c-tests.py' (Expected 0, got 0)
:: [ 15:52:52 ] :: [ BEGIN ] :: Running 'cp /var/run/dhcp6c_duid /var/db/dhcp6c_duid'
:: [ 15:52:52 ] :: [ PASS ] :: Command 'cp /var/run/dhcp6c_duid /var/db/dhcp6c_duid' (Expected 0, got 0)
:: [ 15:52:52 ] :: [ BEGIN ] :: Running 'chattr -i /etc/resolv.conf'
:: [ 15:52:52 ] :: [ PASS ] :: Command 'chattr -i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:52 ] :: [ LOG ] :: dhcp6c tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 3 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Package : wide-dhcpv6
Installed : wide-dhcpv6-20080615-13.1.fc28.6.x86_64
beakerlib RPM : beakerlib-1.17-13.fc28.noarch
Test started : 2018-05-20 15:52:27 IST
Test finished : 2018-05-20 15:52:52 IST (still running)
Test duration : 25 seconds
Test name : unknown
Distro : Fedora release 28 (Twenty Eight)
Hostname : Zeus
Architecture : x86_64
CPUs : 8 x Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
RAM size : 15731 MB
HDD size : 226.83 GB
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:27 ] :: [ PASS ] :: Checking for the presence of wide-dhcpv6 rpm
:: [ 15:52:27 ] :: [ LOG ] :: Package versions:
:: [ 15:52:27 ] :: [ LOG ] :: wide-dhcpv6-20080615-13.1.fc28.6.x86_64
:: [ 15:52:27 ] :: [ PASS ] :: Command 'cp dhcp6c-tests.py /usr/bin/' (Expected 0, got 0)
:: [ 15:52:27 ] :: [ PASS ] :: Command 'chattr +i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:27 ] :: [ PASS ] :: Command 'cp /var/db/dhcp6c_duid /var/run/' (Expected 0, got 0)
:: [ 15:52:27 ] :: [ PASS ] :: Command 'cp dhcp6c_duid /var/db/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 5 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:27 ] :: [ LOG ] :: Starting dhcp6c tests ...
:: [ 15:52:52 ] :: [ PASS ] :: Command '/usr/bin/python3 /usr/bin/dhcp6c-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 25s
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:52 ] :: [ PASS ] :: Command 'rm /usr/bin/dhcp6c-tests.py' (Expected 0, got 0)
:: [ 15:52:52 ] :: [ PASS ] :: Command 'cp /var/run/dhcp6c_duid /var/db/dhcp6c_duid' (Expected 0, got 0)
:: [ 15:52:52 ] :: [ PASS ] :: Command 'chattr -i /etc/resolv.conf' (Expected 0, got 0)
:: [ 15:52:52 ] :: [ LOG ] :: dhcp6c tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 3 good, 0 bad
:: RESULT: PASS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: unknown
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:52:52 ] :: [ LOG ] :: JOURNAL XML: /var/tmp/beakerlib-UvSKdRF/journal.xml
:: [ 15:52:52 ] :: [ LOG ] :: JOURNAL TXT: /var/tmp/beakerlib-UvSKdRF/journal.txt
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 25s
:: Phases: 3 good, 0 bad
:: OVERALL RESULT: PASS
ddd