[RIC-621] Add redis monitor verification to automation tests
Change-Id: I512c9984887d417a53dd868f0b68b0c1151f185d
Signed-off-by: ss412g <shuky.har-noy@intl.att.com>
diff --git a/Automation/Tests/Resource/Keywords.robot b/Automation/Tests/Resource/Keywords.robot
index ff6fbbe..4d046bf 100644
--- a/Automation/Tests/Resource/Keywords.robot
+++ b/Automation/Tests/Resource/Keywords.robot
@@ -23,8 +23,10 @@
*** Settings ***
Documentation Keywords file
Library ../Scripts/cleanup_db.py
+Library ../Scripts/k8s_helper.py
Resource ../Resource/resource.robot
Library OperatingSystem
+Library Process
*** Keywords ***
Get Request node b gnb
@@ -37,7 +39,15 @@
Add eNb Request
Sleep 1s
- POST ${add_enb_url} ${add_enb_request_body}
+ POST ${enb_url} ${add_enb_request_body}
+
+Delete eNb Request
+ Sleep 1s
+ DELETE ${enb_url}/${enb_ran_name}
+
+Update eNb Request
+ Sleep 1s
+ PUT ${enb_url}/${enb_ran_name} ${update_enb_request_body}
Set General Configuration request
Sleep 1s
@@ -52,6 +62,7 @@
Remove File ${EXECDIR}/${e2mgr_log_filename}
Remove File ${EXECDIR}/${e2t_log_filename}
+
Save logs
Sleep 1s
Run ${Save_sim_log}
@@ -79,7 +90,6 @@
${Save_sim_log} Evaluate "kubectl -n ricplt logs --since-time=${starting_timestamp} $(${gnbe2_sim_pod}) > ${gnb_log_filename}"
${Save_e2mgr_log} Evaluate "kubectl -n ricplt logs --since-time=${starting_timestamp} $(${e2mgr_pod}) > ${e2mgr_log_filename}"
${Save_e2t_log} Evaluate "kubectl -n ricplt logs --since-time=${starting_timestamp} $(${e2term_pod}) > ${e2t_log_filename}"
-
Set Suite Variable ${e2t_log_filename}
Set Suite Variable ${e2mgr_log_filename}
Set Suite Variable ${gnb_log_filename}
@@ -165,3 +175,27 @@
Stop E2
Stop Routing Manager
+Start Redis Monitor
+ Log To Console Starting redis monitor log
+ ${redis_monitor_log_filename} Evaluate "redis_monitor.${SUITE NAME}.log".replace(" ","-")
+ Set Suite Variable ${redis_monitor_log_filename}
+ Remove File ${EXECDIR}/${redis_monitor_log_filename}
+ Start Process kubectl -n ricplt exec -it statefulset-ricplt-dbaas-server-0 redis-cli MONITOR>${EXECDIR}/${redis_monitor_log_filename} shell=yes
+
+Stop Redis Monitor
+ Log To Console Stopping redis monitor log
+ log_scripts.kill_redis_monitor_root_process
+
+
+Redis Monitor Logs - Verify Publish To Manipulation Channel
+ [Arguments] ${ran_name} ${string}
+ Log To Console Verify Publish To Manipulation Channel
+ ${result}= log_scripts.verify_redis_monitor_manipulation_message ${EXECDIR}/${redis_monitor_log_filename} ${ran_name} ${string}
+ Should Be Equal As Strings ${result} True
+
+Redis Monitor Logs - Verify Publish To Connection Status Channel
+ [Arguments] ${ran_name} ${string}
+ 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}
+ Should Be Equal As Strings ${result} True
+