647cf34 Add integration tests to iperf3

Authored and Committed by Susant Sahani 6 years ago
    Add integration tests to iperf3
    
    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.fc27.noarch
    python2-dnf-2.7.5-1.fc27.noarch
    libselinux-python-2.7-2.fc27.x86_64
    standard-test-roles-2.5-1.fc27.noarch
    Run tests for Classic
    Snip of the example test run for Classic tests:
    ```
    
    ```
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Setup
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    iperf3-3.5-1.fc28.x86_64
    :: [ 17:52:13 ] :: [   PASS   ] :: Checking for the presence of iperf3 rpm
    :: [ 17:52:13 ] :: [   LOG    ] :: Package versions:
    :: [ 17:52:13 ] :: [   LOG    ] ::   iperf3-3.5-1.fc28.x86_64
    :: [ 17:52:13 ] :: [  BEGIN   ] :: Running 'cp iperf3-test.py /usr/bin/'
    :: [ 17:52:13 ] :: [   PASS   ] :: Command 'cp iperf3-test.py /usr/bin/' (Expected 0, got 0)
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 0s
    ::   Assertions: 2 good, 0 bad
    ::   RESULT: PASS
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Test
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :: [ 17:52:13 ] :: [   LOG    ] :: iperf3 tests
    :: [ 17:52:13 ] :: [  BEGIN   ] :: Running '/usr/bin/python3 /usr/bin/iperf3-test.py'
    test_basic_tcp_client_default_port_5201 (__main__.Iperf3SanityTests) ... ok
    test_basic_udp_client_default_port_5201 (__main__.Iperf3SanityTests) ... ok
    test_server_daemon_pid_equal_to_pid_file (__main__.Iperf3SanityTests) ... ok
    test_server_log_file_exists (__main__.Iperf3SanityTests) ... ok
    test_server_pid_file_exists (__main__.Iperf3SanityTests) ... ok
    test_tcp_client_custom_port_5202 (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_custom_client_port (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_dscp (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_get_server_output (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_mss (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_parallel (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_reverse (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_time_15sec (__main__.Iperf3Tests) ... ok
    test_tcp_client_custom_port_5202_title (__main__.Iperf3Tests) ... ok
    test_tcp_client_port_5202_ipv6 (__main__.Iperf3Tests) ... ok
    test_udp_client_custom_port_5202 (__main__.Iperf3Tests) ... ok
    test_udp_client_port_5202_ipv6 (__main__.Iperf3Tests) ... ok
    test_tcp_client_bind_to_interface_default_port (__main__.Iperf3TestsBindToInterface) ... ok
    
    ----------------------------------------------------------------------
    Ran 18 tests in 266.088s
    
    OK
    :: [ 17:56:39 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/iperf3-test.py' (Expected 0, got 0)
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 266s
    ::   Assertions: 1 good, 0 bad
    ::   RESULT: PASS
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Cleanup
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :: [ 17:56:39 ] :: [  BEGIN   ] :: Running 'rm /usr/bin/iperf3-test.py'
    :: [ 17:56:39 ] :: [   PASS   ] :: Command 'rm /usr/bin/iperf3-test.py' (Expected 0, got 0)
    :: [ 17:56:39 ] :: [   LOG    ] :: iperf3 tests done
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 0s
    ::   Assertions: 1 good, 0 bad
    ::   RESULT: PASS
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   TEST PROTOCOL
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
        Package       : iperf3
        Installed     : iperf3-3.5-1.fc28.x86_64
        beakerlib RPM : beakerlib-1.17-13.fc28.noarch
        Test started  : 2018-04-30 17:52:12 IST
        Test finished : 2018-04-30 17:56:39 IST (still running)
        Test duration : 267 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
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :: [ 17:52:13 ] :: [   PASS   ] :: Checking for the presence of iperf3 rpm
    :: [ 17:52:13 ] :: [   LOG    ] :: Package versions:
    :: [ 17:52:13 ] :: [   LOG    ] ::   iperf3-3.5-1.fc28.x86_64
    :: [ 17:52:13 ] :: [   PASS   ] :: Command 'cp iperf3-test.py /usr/bin/' (Expected 0, got 0)
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 0s
    ::   Assertions: 2 good, 0 bad
    ::   RESULT: PASS
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Test
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :: [ 17:52:13 ] :: [   LOG    ] :: iperf3 tests
    :: [ 17:56:39 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/iperf3-test.py' (Expected 0, got 0)
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 266s
    ::   Assertions: 1 good, 0 bad
    ::   RESULT: PASS
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Cleanup
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :: [ 17:56:39 ] :: [   PASS   ] :: Command 'rm /usr/bin/iperf3-test.py' (Expected 0, got 0)
    :: [ 17:56:39 ] :: [   LOG    ] :: iperf3 tests done
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 0s
    ::   Assertions: 1 good, 0 bad
    ::   RESULT: PASS
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   unknown
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    :: [ 17:56:39 ] :: [   LOG    ] :: JOURNAL XML: /var/tmp/beakerlib-MrRVFrz/journal.xml
    :: [ 17:56:39 ] :: [   LOG    ] :: JOURNAL TXT: /var/tmp/beakerlib-MrRVFrz/journal.txt
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::   Duration: 267s
    ::   Phases: 3 good, 0 bad
    ::   OVERALL RESULT: PASS
    
    ```
    
    Tested by : Bruno Goncalves <bgoncalv@redhat.com>
    
        
file added
+11