[RIC-621] - Fix Automation 56/4456/1
authorss412g <shuky.har-noy@intl.att.com>
Mon, 27 Jul 2020 08:09:49 +0000 (08:09 +0000)
committerss412g <shuky.har-noy@intl.att.com>
Mon, 27 Jul 2020 08:11:21 +0000 (08:11 +0000)
Change-Id: Ia77115f8607fe33479c62f43f711328e467b50a5
Signed-off-by: ss412g <shuky.har-noy@intl.att.com>
22 files changed:
Automation/Tests/A_Init/Init.robot
Automation/Tests/Add_ENB/Add_ENB_Happy.robot
Automation/Tests/Delete_ENB/Delete_ENB_Test.robot
Automation/Tests/E2Term_Initialization/E2Term_Init_Message_Test.robot
Automation/Tests/E2_Setup_Failure/Enable_Ric_False_Setup_Failure.robot
Automation/Tests/E2_Setup_Failure/RM_Error_Setup_Failure.robot
Automation/Tests/Get-All-Nodes-Real/Get_all_nodes_run_setup_and_get_all.robot
Automation/Tests/Health/get_health_check_unhappy.robot
Automation/Tests/KeepAlive/keep_alive_test.robot
Automation/Tests/Lost_Connection/LostConnectionTestConnectedRan.robot
Automation/Tests/RedButton/RedButton_CONNECTED.robot
Automation/Tests/RedButton/RedButton_CONNECTED_SHUTDOWN_CONNECTED.robot
Automation/Tests/RedButton/RedButton_SHUTDOWN_SHUTDOWN.robot
Automation/Tests/Resource/Keywords.robot
Automation/Tests/Scripts/log_scripts.py
Automation/Tests/Setup_Failure/Setup_failure.robot
Automation/Tests/Unhappy/Get_All_Nodedb_HttpResponse500.robot
Automation/Tests/Unhappy/Get_Nodeb_HttpResponse500.robot
Automation/Tests/Unhappy/RedButton_HttpResponse500.robot
Automation/Tests/Update_ENB/Update_ENB.robot
Automation/deprecated/Get-All-Nodes/Get-All-Nodes/Get_nodes_Add_nodes_and_get.robot [moved from Automation/Tests/Get-All-Nodes/Get_nodes_Add_nodes_and_get.robot with 100% similarity]
Automation/deprecated/Get-All-Nodes/Get-All-Nodes/__init__.robot [moved from Automation/Tests/Get-All-Nodes/__init__.robot with 100% similarity]

index db8e2c0..5dd449c 100644 (file)
@@ -30,17 +30,17 @@ Resource   ../Resource/Keywords.robot
 Init Environment And Validate
     Stop All Pods Except Simulator
     Restart simulator
-    Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers    1
+    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    1
 
     Start E2 Manager
     Start Dbass
-    Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers    3
+    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    3
 
     Start Routing Manager
-    Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers    4
+    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    4
 
     Start E2
-    Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 
 
index 970a151..171e4d7 100644 (file)
 
 *** Settings ***
 Variables  ../Scripts/variables.py
-Suite Setup   Prepare Enviorment  ${False}
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Library     OperatingSystem
-Library     Process
 Library     ../Scripts/log_scripts.py
 Library     REST        ${url}
 
@@ -36,9 +34,9 @@ Library     REST        ${url}
 ${url}  ${e2mgr_address}
 
 *** Test Cases ***
-
-Prepare Redis Monitor Log
+[Setup]
     Start Redis Monitor
+    Prepare Enviorment  ${False}
 
 Add eNB
     Sleep  2s
index 0ac5a4c..2e28630 100644 (file)
@@ -23,7 +23,6 @@
 
 *** Settings ***
 Variables  ../Scripts/variables.py
-Suite Setup   Prepare Enviorment  ${False}
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Library     OperatingSystem
@@ -37,8 +36,9 @@ ${url}  ${e2mgr_address}
 
 *** Test Cases ***
 
-Prepare Redis Monitor Log
+[Setup]
     Start Redis Monitor
+    Prepare Enviorment  ${False}
 
 Add eNB
     Sleep  2s
index 692e2ed..b350c23 100644 (file)
@@ -36,9 +36,9 @@ Test New E2T Send Init
     Stop Routing Manager
     Flush And Populate DB
     Start Routing Manager
-    wait until keyword succeeds  1 min    10 sec    Validate Required Dockers    ${pods_number-1}
+    wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    ${pods_number-1}
     Start E2
-    wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+    wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 Prepare Logs For Tests
     Remove log files
index 76c36e0..4f3bed1 100644 (file)
@@ -40,7 +40,7 @@ ${url}  ${e2mgr_address}
 Disable ric and restart simulator
     ${result}    e2mdbscripts.set_enable_ric_false
     Restart simulator
-    wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+    wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 prepare logs for tests
     Remove log files
index 883ef98..31f10c7 100644 (file)
@@ -38,7 +38,7 @@ ${url}  ${e2mgr_address}
 Stop routing manager and restarting gnb simulator
     Stop Routing Manager
     Restart simulator
-    wait until keyword succeeds  1 min    10 sec    Validate Required Dockers    ${pods_number-1}
+    wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    ${pods_number-1}
 
 prepare logs for tests
     Remove log files
@@ -62,6 +62,7 @@ E2M Logs - Verify RMR Message
     ${result}    find_rmr_message.verify_logs   ${EXECDIR}   ${e2mgr_log_filename}  ${Setup_failure_message_type}    ${None}
     Should Be Equal As Strings    ${result}      True
 
-
-              Start Routing Manager
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
\ No newline at end of file
+[Teardown]
+    Run Keywords
+    Start Routing Manager
+    AND Wait Until Keyword Succeeds  2 min    10 sec    Validate Required Dockers
\ No newline at end of file
index 91ab8ad..e1bef71 100644 (file)
@@ -40,23 +40,31 @@ Add eNb Node
 
 
 Get all node ids
-    GET     v1/nodeb/ids
+    &{res}=   GET     v1/nodeb/states
     Sleep  2s
     Integer  response status   200
 
-    #Verify eNB node
-    String   response body 0 inventoryName    ${enb_ran_name}
-    String   response body 0 connectionStatus    DISCONNECTED
-    String   response body 0 globalNbId plmnId   def
-    String   response body 0 globalNbId nbId     abc
-
-    #Verify gNB node
-    String   response body 1 inventoryName  ${ranName}
-#    String   response body 1 connectionStatus    CONNECTED
-#    String   response body 1 nodeType     GNB
-    String   response body 1 globalNbId plmnId   02F829
-    String   response body 1 globalNbId nbId     001100000011000000110000
-
+    ${is_enb_first}=    set variable if  '${enb_ran_name}'=='${res.body[0].inventoryName}'   True    False
+
+    run keyword if  ${is_enb_first}    RUN KEYWORDS
+...      String   response body 1 inventoryName    ${ranName}
+...      AND   String   response body 1 globalNbId plmnId   02F829
+...      AND   String   response body 1 globalNbId nbId     001100000011000000110000
+...      AND   String   response body 0 inventoryName    ${enb_ran_name}
+...      AND   String   response body 0 connectionStatus    DISCONNECTED
+...      AND   String   response body 0 globalNbId plmnId   def
+...      AND   String   response body 0 globalNbId nbId     abc
+...      AND   Log To Console    enb index is 0 - all rans were verified successfully
+
+...  ELSE     RUN KEYWORDS
+...      String   response body 0 inventoryName    ${ranName}
+...      AND   String   response body 0 globalNbId plmnId   02F829
+...      AND   String   response body 0 globalNbId nbId     001100000011000000110000
+...      AND   String   response body 1 inventoryName    ${enb_ran_name}
+...      AND   String   response body 1 connectionStatus    DISCONNECTED
+...      AND   String   response body 1 globalNbId plmnId   def
+...      AND   String   response body 1 globalNbId nbId     abc
+...      AND   Log To Console    enb index is 1 - all rans were verified successfully
 
 Prepare Logs For Tests
     Remove log files
index 7222889..f17d291 100644 (file)
@@ -42,9 +42,10 @@ Prepare logs
     Remove log files
     Save logs
 
-[Teardown]    Run Keywords
-              Start Dbass
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+[Teardown]
+    Run Keywords
+    Start Dbass
+    AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 
 
index 832e8ff..353664b 100644 (file)
@@ -22,7 +22,6 @@ Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Library    ../Scripts/find_error_script.py
 Library     ../Scripts/find_rmr_message.py
-Library     ../Scripts/rsmscripts.py
 Library     ../Scripts/e2mdbscripts.py
 Library    OperatingSystem
 Library    Collections
@@ -82,4 +81,4 @@ Verify E2T instance removed from db
 
 [Teardown]    Run Keywords
               Start E2
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
\ No newline at end of file
+              AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
\ No newline at end of file
index 3d9a0ef..5f3f59f 100644 (file)
@@ -70,5 +70,5 @@ Redis Monitor Logs - Verify Publish
 
 [Teardown]    Run Keywords
               Start Simulator
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+              AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
               AND Stop Redis Monitor
\ No newline at end of file
index 4cbfffe..00524a3 100644 (file)
@@ -22,7 +22,6 @@
 
 *** Settings ***
 Variables  ../Scripts/variables.py
-Suite Setup   Prepare Enviorment    ${True}
 Resource    ../Resource/resource.robot
 Resource    ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
@@ -37,8 +36,9 @@ ${url}  ${e2mgr_address}
 
 *** Test Cases ***
 
-Prepare Redis Monitor Log
+[Setup]
     Start Redis Monitor
+    Prepare Enviorment    ${True}
 
 Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance
    Verify connected and associated
index 5cc0db7..162519e 100644 (file)
@@ -22,7 +22,6 @@
 
 *** Settings ***
 Variables  ../Scripts/variables.py
-Suite Setup   Prepare Enviorment    ${True}
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
@@ -37,8 +36,9 @@ ${url}  ${e2mgr_address}
 
 *** Test Cases ***
 
-Prepare Redis Monitor Log
+[Setup]
     Start Redis Monitor
+    Prepare Enviorment    ${True}
 
 Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance
   Verify connected and associated
@@ -59,7 +59,7 @@ Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t
 
 Restart simulator
    Restart simulator
-   wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+   wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance - checking again
    Verify connected and associated
index b91dddc..1909a98 100644 (file)
@@ -22,7 +22,6 @@
 
 *** Settings ***
 Variables  ../Scripts/variables.py
-Suite Setup   Prepare Enviorment    ${True}
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
@@ -37,8 +36,9 @@ ${url}  ${e2mgr_address}
 
 *** Test Cases ***
 
-Prepare Redis Monitor Log
+[Setup]
     Start Redis Monitor
+    Prepare Enviorment    ${True}
 
 Verify nodeb connection status is CONNECTED and it's associated to an e2t instance
    Verify connected and associated
index b05e57e..e506657 100644 (file)
@@ -74,11 +74,11 @@ Prepare Enviorment
      Init logs
      Flush And Populate DB    ${set_new_timestamp}
      Run keyword if  ${need_to_restart_pods}==${True}   Restart RM and GNB Simulator
-     Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+     Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 Restart RM and GNB Simulator
     Restart routing manager
-    Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
     Restart simulator
 
 
@@ -136,7 +136,7 @@ Stop Dbass
 Stop Simulator
     log to console  Stopping gnbe2 simulator
     Run And Return Rc And Output    ${stop_simu}
-    Sleep  50s
+    Sleep  70s
 
 Start Simulator
     log to console  Starting gnbe2 simulator
@@ -188,14 +188,13 @@ Stop Redis Monitor
 
 
 Redis Monitor Logs - Verify Publish To Manipulation Channel
-    [Arguments]       ${ran_name}    ${string}
+    [Arguments]       ${ran_name}    ${event}
     Log To Console  Verify Publish To Manipulation Channel
-    ${result}=  log_scripts.verify_redis_monitor_manipulation_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${string}
+    ${result}=  log_scripts.verify_redis_monitor_manipulation_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
     Should Be Equal As Strings    ${result}      True
 
 Redis Monitor Logs - Verify Publish To Connection Status Channel
-    [Arguments]       ${ran_name}    ${string}
+    [Arguments]       ${ran_name}    ${event}
     Log To Console    Verify Publish To Connection Status Channel
-    ${result}=  log_scripts.verify_redis_monitor_connection_status_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${string}
+    ${result}=  log_scripts.verify_redis_monitor_connection_status_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
     Should Be Equal As Strings    ${result}      True
-
index 446ed11..4cc5009 100644 (file)
@@ -35,12 +35,12 @@ def verify_log_message(file_path, message):
     return False
 
 
-def verify_redis_monitor_manipulation_message(file_path, ran_name, action):
-    message = "\"PUBLISH\" \"{e2Manager},RAN_MANIPULATION\" \"" + ran_name + "_" + action + "\""
+def verify_redis_monitor_manipulation_message(file_path, ran_name, event):
+    message = "\"PUBLISH\" \"{e2Manager},RAN_MANIPULATION\" \"" + ran_name + "_" + event + "\""
     return verify_log_message(file_path, message)
 
-def verify_redis_monitor_connection_status_message(file_path, ran_name, status):
-    message = "\"PUBLISH\" \"{e2Manager},RAN_CONNECTION_STATUS_CHANGE\" \"" + ran_name + "_" + status + "\""
+def verify_redis_monitor_connection_status_message(file_path, ran_name, event):
+    message = "\"PUBLISH\" \"{e2Manager},RAN_CONNECTION_STATUS_CHANGE\" \"" + ran_name + "_" + event + "\""
     return verify_log_message(file_path, message)
 
 
index 75e045d..4aa0ef4 100644 (file)
@@ -38,7 +38,7 @@ ${url}  ${e2mgr_address}
 Stop Routing manager simulator and restarting simulator
     Stop Routing Manager
     restart simulator
-    wait until keyword succeeds  1 min    10 sec    Validate Required Dockers    ${pods_number-1}
+    wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    ${pods_number-1}
 
 prepare logs for tests
     Remove log files
@@ -64,7 +64,7 @@ E2M Logs - Verify RMR Message
 
 [Teardown]    Run Keywords
               Start Routing Manager
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+              AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
 
 
 
index b71959e..230699e 100644 (file)
@@ -40,4 +40,4 @@ Get All nodes - 500 http - 500 RNIB error
 
 [Teardown]    Run Keywords
               Start Dbass
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
+              AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
index c74f1c6..094be5f 100644 (file)
@@ -55,4 +55,4 @@ Verify e2mgr logs - Third retry to retrieve from db
 
 [Teardown]    Run Keywords
               Start Dbass
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
\ No newline at end of file
+              AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
\ No newline at end of file
index 2d1fff8..3388cfe 100644 (file)
@@ -41,4 +41,4 @@ Red Button - Shut Dwon - 500 RNIB error
 
 [Teardown]    Run Keywords
               Start Dbass
-              AND wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
\ No newline at end of file
+              AND wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
\ No newline at end of file
index e09c320..b364ac4 100644 (file)
@@ -23,7 +23,6 @@
 
 *** Settings ***
 Variables  ../Scripts/variables.py
-Suite Setup   Prepare Enviorment  ${False}
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Library     OperatingSystem
@@ -37,8 +36,9 @@ ${url}  ${e2mgr_address}
 
 *** Test Cases ***
 
-Prepare Redis Monitor Log
+[Setup]
     Start Redis Monitor
+    Prepare Enviorment  ${False}
 
 Add eNB
     Sleep  2s