BUG-8013: Fix Bmp Basic test 68/53568/6
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Mon, 20 Mar 2017 09:55:57 +0000 (10:55 +0100)
committerVratko Polák <vrpolak@cisco.com>
Tue, 21 Mar 2017 15:45:29 +0000 (15:45 +0000)
Verify feature is installed and up, before
proceed with the test

Change-Id: I8bd1fc42031e00a1c47e131e83dbd39abfa316e1
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
csit/suites/bgpcep/bgpfunct/050_bmp_basic.robot
csit/variables/bgpfunctional/bmp_basic/empty_structure/data.json [new file with mode: 0644]
csit/variables/bgpfunctional/bmp_basic/empty_structure/location.uri [moved from csit/variables/bgpfunctional/bmp_basic/location.uri with 100% similarity]
csit/variables/bgpfunctional/bmp_basic/filled_structure/data.json [moved from csit/variables/bgpfunctional/bmp_basic/data.json with 100% similarity]
csit/variables/bgpfunctional/bmp_basic/filled_structure/location.uri [new file with mode: 0644]

index fb05935a89be2b637091cbb743368cc59407f35e..10eaf54b1ba1c108dbfd5aa61e7f58acb366bab6 100644 (file)
@@ -27,10 +27,17 @@ Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${CONFIG_SESSION}    config-session
-${BGP_BMP_DIR}    ${CURDIR}/../../../variables/bgpfunctional/bmp_basic
+${BGP_BMP_DIR}    ${CURDIR}/../../../variables/bgpfunctional/bmp_basic/filled_structure
+${BGP_BMP_FEAT_DIR}    ${CURDIR}/../../../variables/bgpfunctional/bmp_basic/empty_structure
 ${BMP_LOG_FILE}    bmpmock.log
 
 *** Test Cases ***
+Verify BMP Feature
+    [Documentation]    Verifies if feature is up
+    &{mapping}    BuiltIn.Create_Dictionary    TOOL_IP=${TOOLS_SYSTEM_IP}
+    BuiltIn.Wait_Until_Keyword_Succeeds    6x    10s    TemplatedRequests.Get_As_Json_Templated    folder=${BGP_BMP_FEAT_DIR}    mapping=${mapping}    session=${CONFIG_SESSION}
+    ...    verify=True
+
 Start_Bmp_Mock
     [Documentation]    Starts bmp-mock on tools vm
     ${command}=    NexusKeywords.Compose_Full_Java_Command    -jar ${filename} --local_address ${TOOLS_SYSTEM_IP} --remote_address ${ODL_SYSTEM_IP}:12345 --routers_count 1 --peers_count 1 --log_level DEBUG 2>&1 | tee ${BMP_LOG_FILE}
diff --git a/csit/variables/bgpfunctional/bmp_basic/empty_structure/data.json b/csit/variables/bgpfunctional/bmp_basic/empty_structure/data.json
new file mode 100644 (file)
index 0000000..66ebc3a
--- /dev/null
@@ -0,0 +1,9 @@
+{
+    "bmp-monitor": {
+        "monitor": [
+            {
+                "monitor-id": "example-bmp-monitor"
+            }
+        ]
+    }
+}
diff --git a/csit/variables/bgpfunctional/bmp_basic/filled_structure/location.uri b/csit/variables/bgpfunctional/bmp_basic/filled_structure/location.uri
new file mode 100644 (file)
index 0000000..513abc0
--- /dev/null
@@ -0,0 +1 @@
+/restconf/operational/bmp-monitor:bmp-monitor