From: ss412g Date: Mon, 27 Jul 2020 08:09:49 +0000 (+0000) Subject: [RIC-621] - Fix Automation X-Git-Tag: R5_RC~19 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F4456%2F1;p=ric-plt%2Fe2mgr.git [RIC-621] - Fix Automation Change-Id: Ia77115f8607fe33479c62f43f711328e467b50a5 Signed-off-by: ss412g --- diff --git a/Automation/Tests/A_Init/Init.robot b/Automation/Tests/A_Init/Init.robot index db8e2c0..5dd449c 100644 --- a/Automation/Tests/A_Init/Init.robot +++ b/Automation/Tests/A_Init/Init.robot @@ -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 diff --git a/Automation/Tests/Add_ENB/Add_ENB_Happy.robot b/Automation/Tests/Add_ENB/Add_ENB_Happy.robot index 970a151..171e4d7 100644 --- a/Automation/Tests/Add_ENB/Add_ENB_Happy.robot +++ b/Automation/Tests/Add_ENB/Add_ENB_Happy.robot @@ -23,11 +23,9 @@ *** 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 diff --git a/Automation/Tests/Delete_ENB/Delete_ENB_Test.robot b/Automation/Tests/Delete_ENB/Delete_ENB_Test.robot index 0ac5a4c..2e28630 100644 --- a/Automation/Tests/Delete_ENB/Delete_ENB_Test.robot +++ b/Automation/Tests/Delete_ENB/Delete_ENB_Test.robot @@ -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 diff --git a/Automation/Tests/E2Term_Initialization/E2Term_Init_Message_Test.robot b/Automation/Tests/E2Term_Initialization/E2Term_Init_Message_Test.robot index 692e2ed..b350c23 100644 --- a/Automation/Tests/E2Term_Initialization/E2Term_Init_Message_Test.robot +++ b/Automation/Tests/E2Term_Initialization/E2Term_Init_Message_Test.robot @@ -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 diff --git a/Automation/Tests/E2_Setup_Failure/Enable_Ric_False_Setup_Failure.robot b/Automation/Tests/E2_Setup_Failure/Enable_Ric_False_Setup_Failure.robot index 76c36e0..4f3bed1 100644 --- a/Automation/Tests/E2_Setup_Failure/Enable_Ric_False_Setup_Failure.robot +++ b/Automation/Tests/E2_Setup_Failure/Enable_Ric_False_Setup_Failure.robot @@ -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 diff --git a/Automation/Tests/E2_Setup_Failure/RM_Error_Setup_Failure.robot b/Automation/Tests/E2_Setup_Failure/RM_Error_Setup_Failure.robot index 883ef98..31f10c7 100644 --- a/Automation/Tests/E2_Setup_Failure/RM_Error_Setup_Failure.robot +++ b/Automation/Tests/E2_Setup_Failure/RM_Error_Setup_Failure.robot @@ -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 diff --git a/Automation/Tests/Get-All-Nodes-Real/Get_all_nodes_run_setup_and_get_all.robot b/Automation/Tests/Get-All-Nodes-Real/Get_all_nodes_run_setup_and_get_all.robot index 91ab8ad..e1bef71 100644 --- a/Automation/Tests/Get-All-Nodes-Real/Get_all_nodes_run_setup_and_get_all.robot +++ b/Automation/Tests/Get-All-Nodes-Real/Get_all_nodes_run_setup_and_get_all.robot @@ -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 diff --git a/Automation/Tests/Health/get_health_check_unhappy.robot b/Automation/Tests/Health/get_health_check_unhappy.robot index 7222889..f17d291 100644 --- a/Automation/Tests/Health/get_health_check_unhappy.robot +++ b/Automation/Tests/Health/get_health_check_unhappy.robot @@ -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 diff --git a/Automation/Tests/KeepAlive/keep_alive_test.robot b/Automation/Tests/KeepAlive/keep_alive_test.robot index 832e8ff..353664b 100644 --- a/Automation/Tests/KeepAlive/keep_alive_test.robot +++ b/Automation/Tests/KeepAlive/keep_alive_test.robot @@ -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 diff --git a/Automation/Tests/Lost_Connection/LostConnectionTestConnectedRan.robot b/Automation/Tests/Lost_Connection/LostConnectionTestConnectedRan.robot index 3d9a0ef..5f3f59f 100644 --- a/Automation/Tests/Lost_Connection/LostConnectionTestConnectedRan.robot +++ b/Automation/Tests/Lost_Connection/LostConnectionTestConnectedRan.robot @@ -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 diff --git a/Automation/Tests/RedButton/RedButton_CONNECTED.robot b/Automation/Tests/RedButton/RedButton_CONNECTED.robot index 4cbfffe..00524a3 100644 --- a/Automation/Tests/RedButton/RedButton_CONNECTED.robot +++ b/Automation/Tests/RedButton/RedButton_CONNECTED.robot @@ -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 diff --git a/Automation/Tests/RedButton/RedButton_CONNECTED_SHUTDOWN_CONNECTED.robot b/Automation/Tests/RedButton/RedButton_CONNECTED_SHUTDOWN_CONNECTED.robot index 5cc0db7..162519e 100644 --- a/Automation/Tests/RedButton/RedButton_CONNECTED_SHUTDOWN_CONNECTED.robot +++ b/Automation/Tests/RedButton/RedButton_CONNECTED_SHUTDOWN_CONNECTED.robot @@ -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 diff --git a/Automation/Tests/RedButton/RedButton_SHUTDOWN_SHUTDOWN.robot b/Automation/Tests/RedButton/RedButton_SHUTDOWN_SHUTDOWN.robot index b91dddc..1909a98 100644 --- a/Automation/Tests/RedButton/RedButton_SHUTDOWN_SHUTDOWN.robot +++ b/Automation/Tests/RedButton/RedButton_SHUTDOWN_SHUTDOWN.robot @@ -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 diff --git a/Automation/Tests/Resource/Keywords.robot b/Automation/Tests/Resource/Keywords.robot index b05e57e..e506657 100644 --- a/Automation/Tests/Resource/Keywords.robot +++ b/Automation/Tests/Resource/Keywords.robot @@ -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 - diff --git a/Automation/Tests/Scripts/log_scripts.py b/Automation/Tests/Scripts/log_scripts.py index 446ed11..4cc5009 100644 --- a/Automation/Tests/Scripts/log_scripts.py +++ b/Automation/Tests/Scripts/log_scripts.py @@ -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) diff --git a/Automation/Tests/Setup_Failure/Setup_failure.robot b/Automation/Tests/Setup_Failure/Setup_failure.robot index 75e045d..4aa0ef4 100644 --- a/Automation/Tests/Setup_Failure/Setup_failure.robot +++ b/Automation/Tests/Setup_Failure/Setup_failure.robot @@ -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 diff --git a/Automation/Tests/Unhappy/Get_All_Nodedb_HttpResponse500.robot b/Automation/Tests/Unhappy/Get_All_Nodedb_HttpResponse500.robot index b71959e..230699e 100644 --- a/Automation/Tests/Unhappy/Get_All_Nodedb_HttpResponse500.robot +++ b/Automation/Tests/Unhappy/Get_All_Nodedb_HttpResponse500.robot @@ -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 diff --git a/Automation/Tests/Unhappy/Get_Nodeb_HttpResponse500.robot b/Automation/Tests/Unhappy/Get_Nodeb_HttpResponse500.robot index c74f1c6..094be5f 100644 --- a/Automation/Tests/Unhappy/Get_Nodeb_HttpResponse500.robot +++ b/Automation/Tests/Unhappy/Get_Nodeb_HttpResponse500.robot @@ -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 diff --git a/Automation/Tests/Unhappy/RedButton_HttpResponse500.robot b/Automation/Tests/Unhappy/RedButton_HttpResponse500.robot index 2d1fff8..3388cfe 100644 --- a/Automation/Tests/Unhappy/RedButton_HttpResponse500.robot +++ b/Automation/Tests/Unhappy/RedButton_HttpResponse500.robot @@ -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 diff --git a/Automation/Tests/Update_ENB/Update_ENB.robot b/Automation/Tests/Update_ENB/Update_ENB.robot index e09c320..b364ac4 100644 --- a/Automation/Tests/Update_ENB/Update_ENB.robot +++ b/Automation/Tests/Update_ENB/Update_ENB.robot @@ -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 diff --git a/Automation/Tests/Get-All-Nodes/Get_nodes_Add_nodes_and_get.robot b/Automation/deprecated/Get-All-Nodes/Get-All-Nodes/Get_nodes_Add_nodes_and_get.robot similarity index 100% rename from Automation/Tests/Get-All-Nodes/Get_nodes_Add_nodes_and_get.robot rename to Automation/deprecated/Get-All-Nodes/Get-All-Nodes/Get_nodes_Add_nodes_and_get.robot diff --git a/Automation/Tests/Get-All-Nodes/__init__.robot b/Automation/deprecated/Get-All-Nodes/Get-All-Nodes/__init__.robot similarity index 100% rename from Automation/Tests/Get-All-Nodes/__init__.robot rename to Automation/deprecated/Get-All-Nodes/Get-All-Nodes/__init__.robot