Upgrade test: Set and unset upgrade flag 34/73734/7
authorJosh <jhershbe@redhat.com>
Wed, 4 Jul 2018 12:11:27 +0000 (15:11 +0300)
committerSam Hague <shague@redhat.com>
Thu, 5 Jul 2018 15:41:37 +0000 (15:41 +0000)
This is something from the defined upgrade
flag that was simply missing from these tests.
A recent fix made this more urgent as without
it there can be sporadic failures.

Change-Id: Ia7e92058fa6fa121e342e4b822570b526fa1ed6c
Signed-off-by: Josh <jhershbe@redhat.com>
csit/suites/netvirt/upgrade/upgrade.robot

index aba7c9e172f441fe368b40e328283fbb03777a64..1b265962b2cc9659cc4005066b34ff4dc9b1a057 100644 (file)
@@ -27,6 +27,7 @@ ${ROUTER}         upgrade_router_1
 ${TYPE}           tun
 ${PASSIVE_MANAGER}    ptcp:6641:127.0.0.1
 @{DEBUG_LOG_COMPONENTS}    org.opendaylight.ovsdb    org.opendaylight.ovsdb.lib    org.opendaylight.netvirt    org.opendaylight.genius
+${UPDATE_FLAG_PATH}    /restconf/config/genius-mdsalutil:config
 
 *** Test Cases ***
 Create Setup And Verify Instance Connectivity
@@ -63,12 +64,20 @@ Wait For Full Sync
     [Documentation]    Wait for networking_odl to sync neutron configuration
     Wait Until Keyword Succeeds    90s    5s    Canary Network Should Exist
 
+Set Upgrade Flag
+    ${resp} =    RequestsLibrary.Put Request    session    ${UPDATE_FLAG_PATH}    {"config":{"upgradeInProgress":true}}
+    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+
 Set OVS Manager And Controller
     [Documentation]    Set controller and manager on each OpenStack node and check that egress flows are present
     : FOR    ${node}    IN    @{OS_ALL_IPS}
     \    Run Command On Remote System    ${node}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT} ${PASSIVE_MANAGER}
     Wait Until Keyword Succeeds    180s    15s    Check OVS Nodes Have Egress Flows
 
+UnSet Upgrade Flag
+    ${resp} =    RequestsLibrary.Put Request    session    ${UPDATE_FLAG_PATH}    {"config":{"upgradeInProgress":false}}
+    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+
 Check Connectivity With Previously Created Resources And br-int Info
     [Documentation]    Check that pre-existing instance connectivity still works after the new controller is brought
     ...    up and config is sync'd