RIC-547 - E2M publish SDL event - Automation 76/4276/1
authorIrina <ib565x@intl.att.com>
Tue, 30 Jun 2020 11:47:37 +0000 (14:47 +0300)
committerIrina <ib565x@intl.att.com>
Tue, 30 Jun 2020 11:47:49 +0000 (14:47 +0300)
Change-Id: Id05cbd972bbcc75c7d4e136cf1ed182545c3bf0a
Signed-off-by: Irina <ib565x@intl.att.com>
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/scripts_variables.robot
E2Manager/services/rnib_data_service.go

index f172c5b..e19efed 100644 (file)
@@ -23,6 +23,8 @@
 Suite Setup   Prepare Enviorment
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Suite Setup   Prepare Enviorment
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
+Resource   ../Resource/scripts_variables.robot
+Library    ../Scripts/find_error_script.py
 Library     ../Scripts/e2mdbscripts.py
 Library     OperatingSystem
 Library    Collections
 Library     ../Scripts/e2mdbscripts.py
 Library     OperatingSystem
 Library    Collections
@@ -31,11 +33,6 @@ Library     REST      ${url}
 
 *** Test Cases ***
 
 
 *** Test Cases ***
 
-prepare logs for tests
-    Remove log files
-    Save logs
-
-
 Setup Ran and verify it's CONNECTED and associated
     Get Request node b gnb
     Integer  response status  200
 Setup Ran and verify it's CONNECTED and associated
     Get Request node b gnb
     Integer  response status  200
@@ -54,6 +51,14 @@ Verify connection status is DISCONNECTED and RAN is not associated with E2T inst
     Missing  response body associatedE2tInstanceAddress
     String   response body connectionStatus    DISCONNECTED
 
     Missing  response body associatedE2tInstanceAddress
     String   response body connectionStatus    DISCONNECTED
 
+prepare logs for tests
+    Remove log files
+    Save logs
+
 Verify E2T instance is NOT associated with RAN
    ${result}    e2mdbscripts.verify_ran_is_associated_with_e2t_instance     ${ranname}  ${e2tinstanceaddress}
    Should Be True    ${result} == False
 Verify E2T instance is NOT associated with RAN
    ${result}    e2mdbscripts.verify_ran_is_associated_with_e2t_instance     ${ranname}  ${e2tinstanceaddress}
    Should Be True    ${result} == False
+
+Verify e2mgr logs - Set and Publish Disconnect True
+  ${result}    find_error_script.find_error     ${EXECDIR}  ${e2mgr_log_filename}    ${set_and_publish_disconnect}
+   Should Be Equal As Strings    ${result}      True
\ No newline at end of file
index dffc874..1dd345c 100644 (file)
@@ -24,7 +24,9 @@
 Suite Setup   Prepare Enviorment
 Resource    ../Resource/resource.robot
 Resource    ../Resource/Keywords.robot
 Suite Setup   Prepare Enviorment
 Resource    ../Resource/resource.robot
 Resource    ../Resource/Keywords.robot
+Resource   ../Resource/scripts_variables.robot
 Resource    red_button_keywords.robot
 Resource    red_button_keywords.robot
+Library    ../Scripts/find_error_script.py
 Library     OperatingSystem
 Library     Collections
 Library     REST      ${url}
 Library     OperatingSystem
 Library     Collections
 Library     REST      ${url}
@@ -38,9 +40,16 @@ Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t in
 Execute Shutdown
    Execute Shutdown
 
 Execute Shutdown
    Execute Shutdown
 
+prepare logs for tests
+    Remove log files
+    Save logs
+
 Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
    Verify shutdown for gnb
 
 Verify E2T instance has no associated RANs
    Verify E2T instance has no associated RANs
 
 Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
    Verify shutdown for gnb
 
 Verify E2T instance has no associated RANs
    Verify E2T instance has no associated RANs
 
+Verify e2mgr logs - Set and Publish Disconnect
+  ${result}    find_error_script.find_error     ${EXECDIR}  ${e2mgr_log_filename}    ${set_and_publish_disconnect}
+   Should Be Equal As Strings    ${result}      True
\ No newline at end of file
index d20a1fa..4637808 100644 (file)
@@ -25,6 +25,8 @@ Suite Setup   Prepare Enviorment
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
+Resource   ../Resource/scripts_variables.robot
+Library    ../Scripts/find_error_script.py
 Library     OperatingSystem
 Library     Collections
 Library     REST      ${url}
 Library     OperatingSystem
 Library     Collections
 Library     REST      ${url}
@@ -37,6 +39,14 @@ Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t in
 Execute Shutdown
    Execute Shutdown
 
 Execute Shutdown
    Execute Shutdown
 
+prepare logs for tests
+    Remove log files
+    Save logs
+
+Verify e2mgr logs - Set and Publish Disconnect
+  ${result}    find_error_script.find_error     ${EXECDIR}  ${e2mgr_log_filename}    ${set_and_publish_disconnect}
+   Should Be Equal As Strings    ${result}      True
+
 Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
    Verify shutdown for gnb
    Verify E2T instance has no associated RANs
 Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
    Verify shutdown for gnb
    Verify E2T instance has no associated RANs
index 7cdf0a6..9561973 100644 (file)
@@ -25,24 +25,34 @@ Suite Setup   Prepare Enviorment
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
 Resource   ../Resource/resource.robot
 Resource   ../Resource/Keywords.robot
 Resource    red_button_keywords.robot
+Resource   ../Resource/scripts_variables.robot
+Library    ../Scripts/find_error_script.py
 Library     OperatingSystem
 Library    Collections
 Library     REST      ${url}
 
 *** Test Cases ***
 Library     OperatingSystem
 Library    Collections
 Library     REST      ${url}
 
 *** Test Cases ***
+
 Verify nodeb connection status is CONNECTED and it's associated to an e2t instance
    Verify connected and associated
 
 Execute Shutdown
    Execute Shutdown
 
 Verify nodeb connection status is CONNECTED and it's associated to an e2t instance
    Verify connected and associated
 
 Execute Shutdown
    Execute Shutdown
 
+prepare logs for tests
+    Remove log files
+    Save logs
+
+Verify e2mgr logs - Set and Publish Disconnect True
+  ${result}    find_error_script.find_error     ${EXECDIR}  ${e2mgr_log_filename}    ${set_and_publish_disconnect}
+   Should Be Equal As Strings    ${result}      True
+
 Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
    Verify shutdown for gnb
 
 Verify E2T instance has no associated RANs
    Verify E2T instance has no associated RANs
 
 Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
    Verify shutdown for gnb
 
 Verify E2T instance has no associated RANs
    Verify E2T instance has no associated RANs
 
-
 Execute second Shutdown
    Execute Shutdown
 
 Execute second Shutdown
    Execute Shutdown
 
index 13b044a..5ddb394 100644 (file)
@@ -32,4 +32,5 @@ ${first_retry_to_retrieve_from_db}      RnibDataService.retry - retrying 1 GetNo
 ${third_retry_to_retrieve_from_db}      RnibDataService.retry - after 3 attempts of GetNodeb
 ${RIC_RES_STATUS_REQ_message_type_successfully_sent}     Message type: 10090 - Successfully sent RMR message
 ${E2_TERM_KEEP_ALIVE_REQ_message_type_successfully_sent}     Message type: 1101 - Successfully sent RMR message
 ${third_retry_to_retrieve_from_db}      RnibDataService.retry - after 3 attempts of GetNodeb
 ${RIC_RES_STATUS_REQ_message_type_successfully_sent}     Message type: 10090 - Successfully sent RMR message
 ${E2_TERM_KEEP_ALIVE_REQ_message_type_successfully_sent}     Message type: 1101 - Successfully sent RMR message
-${save_general_configuration}      SetGeneralConfigurationHandler.Handle - save general configuration to rnib: {EnableRic:false}
\ No newline at end of file
+${save_general_configuration}      SetGeneralConfigurationHandler.Handle - save general configuration to rnib: {EnableRic:false}
+${set_and_publish_disconnect}      RnibDataService.UpdateNodebInfoOnConnectionStatusInversion - stateChangeMessageChannel: RAN_CONNECTION_STATUS_CHANGE, event: gnb_208_092_303030_DISCONNECTED
\ No newline at end of file
index e96ba48..5e3df8d 100644 (file)
@@ -304,7 +304,7 @@ func (w *rNibDataService) PingRnib() bool {
 }
 
 func (w *rNibDataService) UpdateNodebInfoOnConnectionStatusInversion(nodebInfo *entities.NodebInfo, event string) error {
 }
 
 func (w *rNibDataService) UpdateNodebInfoOnConnectionStatusInversion(nodebInfo *entities.NodebInfo, event string) error {
-       w.logger.Infof("#RnibDataService.UpdateNodebInfoOnConnectionStatusInversion - nodebInfo: %s", nodebInfo)
+       w.logger.Infof("#RnibDataService.UpdateNodebInfoOnConnectionStatusInversion - stateChangeMessageChannel: %s, event: %s, nodebInfo: %s", w.stateChangeMessageChannel, event, nodebInfo)
 
        err := w.retry("UpdateNodebInfoOnConnectionStatusInversion", func() (err error) {
                err = w.rnibWriter.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, w.stateChangeMessageChannel, event)
 
        err := w.retry("UpdateNodebInfoOnConnectionStatusInversion", func() (err error) {
                err = w.rnibWriter.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, w.stateChangeMessageChannel, event)