Bug 8033 - Skip test_mtu_sized_frames
[integration/test.git] / csit / suites / openstack / tempest / tempest.robot
1 *** Settings ***
2 Documentation     Test suite for running tempest tests. It is assumed that the test environment
3 ...               is already deployed and ready.
4 Suite Setup       Log In To Tempest Executor And Setup Test Environment
5 Suite Teardown    Clean Up After Running Tempest
6 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
7 Test Teardown     Run Keywords    Get Test Teardown Debugs
8 Test Template     DevstackUtils.Run Tempest Tests
9 Library           SSHLibrary
10 Resource          ../../../libraries/DevstackUtils.robot
11 Resource          ../../../libraries/OpenStackOperations.robot
12 Resource          ../../../libraries/SetupUtils.robot
13 Resource          ../../../libraries/Utils.robot
14 Variables         ../../../variables/Variables.py
15
16 *** Variables ***
17 ${exclusion_regex}    'test_routers_negative.RoutersNegativeIpV6Test.test_router_set_gateway_used_ip_returns_409|test_routers_negative.RoutersNegativeTest.test_router_set_gateway_used_ip_returns_409'
18 ${tempest_config_file}    /opt/stack/tempest/etc/tempest.conf
19 ${external_net_name}    external-net
20 ${external_subnet_name}    external-subnet
21 ${external_gateway}    10.10.10.250
22 ${external_subnet}    10.10.10.0/24
23 ${network_vlan_id}    167
24
25 *** Test Cases ***
26 tempest.api.network
27     # mitaka release and earlier would fail on the RoutersNegative* tests, so skipping here and running
28     # explicitly in their own test cases which will skip_if_stable/mitaka is the openstack branch
29     ${TEST_NAME}    ${exclusion_regex}
30
31 tempest.api.network.test_routers_negative.RoutersNegativeIpV6Test
32     [Tags]    skip_if_stable/mitaka
33     # OpenStack patch to fix this was merged in newton+ and will not be back-ported to mitaka
34     # https://review.openstack.org/#/c/219215
35     ${TEST_NAME}
36
37 tempest.api.network.test_routers_negative.RoutersNegativeTest
38     [Tags]    skip_if_stable/mitaka
39     # OpenStack patch to fix this was merged in newton+ and will not be back-ported to mitaka
40     # https://review.openstack.org/#/c/219215
41     ${TEST_NAME}
42
43 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_connectivity_between_vms_on_different_networks
44     ${TEST_NAME}
45
46 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_hotplug_nic
47     [Tags]    skip_if_stable/mitaka
48     # Failing due to default security rules behavior missing in Mitaka
49     ${TEST_NAME}
50
51 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_mtu_sized_frames
52     [Tags]    skip_if_stable/mitaka    skip_if_stable/newton
53     ${TEST_NAME}
54
55 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
56     ${TEST_NAME}
57
58 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_preserve_preexisting_port
59     ${TEST_NAME}
60
61 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_router_rescheduling
62     ${TEST_NAME}
63
64 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_subnet_details
65     ${TEST_NAME}
66
67 tempest.scenario.test_aggregates_basic_ops.TestAggregatesBasicOps.test_aggregate_basic_ops
68     ${TEST_NAME}
69
70 tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_pause_unpause
71     ${TEST_NAME}
72
73 tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_stop_start
74     ${TEST_NAME}
75
76 tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_reboot
77     ${TEST_NAME}
78
79 tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_rebuild
80     ${TEST_NAME}
81
82 tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_suspend_resume
83     ${TEST_NAME}
84
85 tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
86     ${TEST_NAME}
87
88 tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_port_security_macspoofing_port
89     [Tags]    skip_if_transparent    skip_if_stable/mitaka
90     # Failing due to default security rules behavior missing in Mitaka, and also in all transparent runs
91     ${TEST_NAME}
92
93 *** Keywords ***
94 Log In To Tempest Executor And Setup Test Environment
95     [Documentation]    Initialize SetupUtils, open SSH connection to a devstack system and source the openstack
96     ...    credentials needed to run the tempest tests
97     SetupUtils.Setup_Utils_For_Setup_And_Teardown
98     # source_pwd is expected to exist in the below Create Network, Create Subnet keywords.    Might be a bug.
99     ${source_pwd}    Set Variable    yes
100     Set Suite Variable    ${source_pwd}
101     # Tempest tests need an existing external network in order to create routers.
102     Create Network    ${external_net_name} --router:external --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network_vlan_id}
103     Create Subnet    ${external_net_name}    ${external_subnet_name}    ${external_subnet}    --gateway ${external_gateway}
104     List Networks
105     ${control_node_conn_id}=    SSHLibrary.Open Connection    ${OS_CONTROL_NODE_IP}    prompt=${DEFAULT_LINUX_PROMPT_STRICT}
106     Utils.Flexible SSH Login    ${OS_USER}
107     Write Commands Until Prompt    source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
108     Write Commands Until Prompt    sudo rm -rf /opt/stack/tempest/.testrepository
109     ${net_id}=    Get Net Id    ${external_net_name}    ${control_node_conn_id}
110     Tempest Conf Add External Network    ${net_id}
111
112 Tempest Conf Add External Network
113     [Arguments]    ${external_network_id}
114     [Documentation]    Tempest will be run with a config file - this function will add the
115     ...    given external network ID to the configuration file.
116     Modify Config In File On Existing SSH Connection    set    network    public_network_id    ${external_network_id}
117     Modify Config In File On Existing SSH Connection    set    DEFAULT    debug    False
118     Modify Config In File On Existing SSH Connection    set    DEFAULT    log_level    INFO
119     Write Commands Until Prompt    sudo cat ${tempest_config_file}
120     Write Commands Until Prompt    sudo chmod 777 ${tempest_config_file}
121
122 Modify Config In File On Existing SSH Connection
123     [Arguments]    ${config_file}    ${modifier}    ${config_section}    ${config_key}    ${config_value}=${EMPTY}
124     [Documentation]    uses crudini to populate oslo cofg file.
125     # this keyword is only one line so seems like extra overhead, but this may be a good candidate to move
126     # to a library at some point, when/if other suites need to use it, so wanted to make it generic.
127     Write Commands Until Prompt    sudo -E crudini --${modifier} ${config_file} ${config_section} ${config_key} ${config_value}
128
129 Clean Up After Running Tempest
130     [Documentation]    Clean up any extra leftovers that were created to allow tempest tests to run.
131     Delete Network    ${external_net_name}
132     List Networks
133     Close All Connections