Migrate 030_bgp_functional_evpn.robot
[integration/test.git] / csit / libraries / IoTDM / iotdm_sanity_tests.robot
index 7abde7f2f43e222579a0de86418e1926c380374f..8c29f4c832ce7b2842da917c369b158efb5f2eb9 100644 (file)
@@ -1,13 +1,15 @@
 *** Settings ***
-Documentation     Keywords for sanity test suites testing basic functionality
-...               using multiple communication protocols
-Library           Collections
-Resource          ../../variables/Variables.robot
-Resource          IoTDMKeywords.robot
-Resource          IoTDMResources.robot
-Library           iotdm_comm.py
-Library           OperatingSystem
-Variables         client_libs/onem2m_primitive.py
+Documentation       Keywords for sanity test suites testing basic functionality
+...                 using multiple communication protocols
+
+Library             Collections
+Resource            ../../variables/Variables.robot
+Resource            IoTDMKeywords.robot
+Resource            IoTDMResources.robot
+Library             iotdm_comm.py
+Library             OperatingSystem
+Variables           client_libs/onem2m_primitive.py
+
 
 *** Keywords ***
 Sanity Test Create AE
@@ -25,7 +27,7 @@ Sanity Test Update AE
 
 Sanity Test Retrieve Updated AE
     [Documentation]    Retrieve updated AE, verify updated element and verify response
-    ${rsp_primitive}    Retrieve Resource    ${defAeUri}
+    ${rsp_primitive}    Retrieve Resource    ${defAeUri}
     ${update_or} =    Get Primitive Content Attribute    ${rsp_primitive}    /m2m:ae/or
     Should Be Equal    ${update_or}    http://hey/you/updated
 
@@ -40,17 +42,25 @@ Sanity Test Retrieve Deleted AE
     ${rsp_primitive} =    Send Primitive    ${primitive}
     Log Primitive    ${rsp_primitive}
     ${expected_message} =    Set Variable    Resource target URI not found: ${defAeUri}
-    Verify Exchange Negative    ${primitive}    ${rsp_primitive}    ${OneM2M.result_code_not_found}    ${expected_message}
+    Verify Exchange Negative
+    ...    ${primitive}
+    ...    ${rsp_primitive}
+    ...    ${OneM2M.result_code_not_found}
+    ...    ${expected_message}
 
 Sanity Test Create AE Container Subscription
-    [Arguments]    ${notification_uri}
     [Documentation]    Create AE, Container and Subscription resources. Subscription resource has set
     ...    eventType 3 so notification will be trigerred when child resource of Container resource is
     ...    created. Notifications will be sent to communication Rx channel.
     ...    Verify response of create requests.
+    [Arguments]    ${notification_uri}
     Sanity Test Create AE
     Create Resource Container    ${defAeUri}    Container1
-    Create Resource Subscription    ${defAeUri}/Container1    ${notification_uri}    notifEventType=${OneM2M.net_create_of_direct_child_resource}    notifContentType=${OneM2M.nct_resource_id}
+    Create Resource Subscription
+    ...    ${defAeUri}/Container1
+    ...    ${notification_uri}
+    ...    notifEventType=${OneM2M.net_create_of_direct_child_resource}
+    ...    notifContentType=${OneM2M.nct_resource_id}
 
 Sanity Test Create Content Instance And Handle Notification
     [Documentation]    Create contentInstance resource what should trigger notification. Receive the notification
@@ -66,10 +76,15 @@ Sanity Test Create Content Instance And Use Automatic Notification Response
     [Documentation]    Set up automatic reply for notifications from specific subscription resource. Create
     ...    contentInstance resource what will trigger the notification and check if was handled
     ...    automatically.
-    ${subscription_resource_id}    Set Variable    ${defAeUri}/Container1/${defSubscriptionName}
+    ${subscription_resource_id}    Set Variable    ${defAeUri}/Container1/${defSubscriptionName}
     Add Auto Reply To Notification From Subscription    ${subscription_resource_id}
     Create Content Instance
-    Wait Until Keyword Succeeds    3x    100ms    Verify Number Of Auto Replies To Notification From Subscription    ${subscription_resource_id}    ${1}
+    Wait Until Keyword Succeeds
+    ...    3x
+    ...    100ms
+    ...    Verify Number Of Auto Replies To Notification From Subscription
+    ...    ${subscription_resource_id}
+    ...    ${1}
     Remove Auto Reply To Notification From Subscription    ${subscription_resource_id}
 
 Create Content Instance
@@ -82,4 +97,4 @@ Receive Notification And Verify
     Should Be Equal    ${from}    /${defCseBaseName}
     ${operation} =    Get Primitive Param    ${notification}    ${OneM2M.short_operation}
     Should Be Equal As Integers    ${operation}    ${OneM2M.operation_notify}
-    Return From Keyword    ${notification}
+    RETURN    ${notification}