From: Luis Gomez Date: Sun, 22 Dec 2013 12:21:49 +0000 (-0800) Subject: NSF test improvements X-Git-Tag: release/helium~104 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=4cdfcf701cf2f09d8e290eedb05fc3b311978fef;p=integration%2Ftest.git NSF test improvements Change-Id: I518d85c66d8185dbba1f3a46fae1591ea91917e9 Signed-off-by: Luis Gomez --- diff --git a/test/csit/suites/base/005__topology_manager.txt b/test/csit/suites/base/005__topology_manager.txt index e9ae23aa5f..2f402c7971 100644 --- a/test/csit/suites/base/005__topology_manager.txt +++ b/test/csit/suites/base/005__topology_manager.txt @@ -21,7 +21,7 @@ Get Topology [Documentation] Get Topology and validate the result. [Tags] get ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 Log ${resp.content} Should Contain X Times ${resp.content} ${nodeconn1} 2 Should Contain X Times ${resp.content} ${nodeconn2} 2 @@ -33,9 +33,9 @@ Add a userlink ${body} Create Dictionary name ${name} status Success srcNodeConnector ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03 ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} data=${body} - Should Be Equal As Strings ${resp.status_code} 201 Response status code error + Should Be Equal As Strings ${resp.status_code} 201 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Contain Value ${content} ${body} @@ -46,9 +46,9 @@ Remove a userlink ${body} Create Dictionary name ${name} status Success srcNodeConnector ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03 ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} - Should Be Equal As Strings ${resp.status_code} 204 Response status code error + Should Be Equal As Strings ${resp.status_code} 204 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Not Contain Value ${content} ${body} diff --git a/test/csit/suites/base/010__statistics_manager.txt b/test/csit/suites/base/010__statistics_manager.txt index 3b2e789926..fb5943d5cc 100644 --- a/test/csit/suites/base/010__statistics_manager.txt +++ b/test/csit/suites/base/010__statistics_manager.txt @@ -28,6 +28,7 @@ get port stats [Documentation] Show port stats and validate result [Tags] get ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port + Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${nodeconn1} Should Contain ${resp.content} ${nodeconn2} Should Contain ${resp.content} ${nodeconn3} @@ -40,6 +41,7 @@ get flow stats [Documentation] Show flow stats and validate result [Tags] get ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${node1} Should Contain ${resp.content} ${node2} Should Contain ${resp.content} ${node3} @@ -47,6 +49,7 @@ get table stats [Documentation] Show flow stats and validate result [Tags] get ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/table + Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${node1} Should Contain ${resp.content} ${node2} Should Contain ${resp.content} ${node3} diff --git a/test/csit/suites/base/020__forwarding_rules_manager.txt b/test/csit/suites/base/020__forwarding_rules_manager.txt index 1dcb2a4838..390949a4cd 100644 --- a/test/csit/suites/base/020__forwarding_rules_manager.txt +++ b/test/csit/suites/base/020__forwarding_rules_manager.txt @@ -12,6 +12,8 @@ ${name} flow1 ${key} flowConfig ${node_id} 00:00:00:00:00:00:00:02 ${REST_CONTEXT} /controller/nb/v2/flowprogrammer +${REST_CONTEXT_ST} /controller/nb/v2/statistics +${FLOW} "10.0.0.1" *** Test Cases *** Add a flow @@ -23,13 +25,20 @@ Add a flow ... ${node} priority 1 etherType 0x800 nwDst ... 10.0.0.1/32 actions ${actions} ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body} - Should Be Equal As Strings ${resp.status_code} 201 Response status code error + Should Be Equal As Strings ${resp.status_code} 201 ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Contain Value ${content} ${body} - +Check flow in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Contain ${resp.content} ${FLOW} Remove a flow [Documentation] Remove a flow, list to validate the result. [Tags] remove @@ -39,9 +48,18 @@ Remove a flow ... ${node} priority 1 etherType 0x800 nwDst ... 10.0.0.1/32 actions ${actions} ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} - Should Be Equal As Strings ${resp.status_code} 204 Response status code error + Should Be Equal As Strings ${resp.status_code} 204 ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Not Contain Value ${content} ${body} +Check flow is not in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Not Contain ${resp.content} ${FLOW} + diff --git a/test/csit/suites/base/025__host_tracker.txt b/test/csit/suites/base/025__host_tracker.txt index f82715f1cd..34856e3f2a 100644 --- a/test/csit/suites/base/025__host_tracker.txt +++ b/test/csit/suites/base/025__host_tracker.txt @@ -11,32 +11,50 @@ Variables ../../variables/Variables.py ${name} 10.0.1.4 ${key} hostConfig ${REST_CONTEXT} /controller/nb/v2/hosttracker +${REST_CONTEXT_ST} /controller/nb/v2/statistics +${FLOW} "10.0.1.4" *** Test Cases *** Add a host [Documentation] Add a host, list to validate the result. [Tags] add ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan - ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress + ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress ... 10.0.1.4 staticHost ${True} nodeConnectorType OF ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/address/${name} data=${body} - Should Be Equal As Strings ${resp.status_code} 201 Response status code error - ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 201 + ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/active + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} - List Should Contain Value ${content} ${body} - + List Should Contain Value ${content} ${body} +Check flow in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Contain X Times ${resp.content} ${FLOW} 3 Remove a host [Documentation] Remove a host, list to validate the result. [Tags] remove ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan - ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress + ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 2 networkAddress ... 10.0.1.4 staticHost ${True} nodeConnectorType OF ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/address/${name} - Should Be Equal As Strings ${resp.status_code} 204 Response status code error + Should Be Equal As Strings ${resp.status_code} 204 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/hosts/inactive - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Not Contain Value ${content} ${body} +Check flow is not in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Not Contain ${resp.content} ${FLOW} + diff --git a/test/csit/suites/base/035__forwarding_manager.txt b/test/csit/suites/base/035__forwarding_manager.txt index 4479555c9b..4ee28d4f5e 100644 --- a/test/csit/suites/base/035__forwarding_manager.txt +++ b/test/csit/suites/base/035__forwarding_manager.txt @@ -20,22 +20,21 @@ Add a static route ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop ... 10.0.0.2 ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body} - Should Be Equal As Strings ${resp.status_code} 201 Response status code error + Should Be Equal As Strings ${resp.status_code} 201 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes Should Be Equal As Strings ${resp.status_code} 200 Response status code error ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Contain Value ${content} ${body} - Sleep 3 Remove a static route [Documentation] Remove a static route, list to validate the result. [Tags] remove ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop ... 10.0.0.2 ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name} - Should Be Equal As Strings ${resp.status_code} 204 Response status code error + Should Be Equal As Strings ${resp.status_code} 204 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Not Contain Value ${content} ${body} diff --git a/test/csit/suites/sp/020__forwarding_rules_manager.txt b/test/csit/suites/sp/020__forwarding_rules_manager.txt index 1dcb2a4838..390949a4cd 100644 --- a/test/csit/suites/sp/020__forwarding_rules_manager.txt +++ b/test/csit/suites/sp/020__forwarding_rules_manager.txt @@ -12,6 +12,8 @@ ${name} flow1 ${key} flowConfig ${node_id} 00:00:00:00:00:00:00:02 ${REST_CONTEXT} /controller/nb/v2/flowprogrammer +${REST_CONTEXT_ST} /controller/nb/v2/statistics +${FLOW} "10.0.0.1" *** Test Cases *** Add a flow @@ -23,13 +25,20 @@ Add a flow ... ${node} priority 1 etherType 0x800 nwDst ... 10.0.0.1/32 actions ${actions} ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body} - Should Be Equal As Strings ${resp.status_code} 201 Response status code error + Should Be Equal As Strings ${resp.status_code} 201 ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Contain Value ${content} ${body} - +Check flow in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Contain ${resp.content} ${FLOW} Remove a flow [Documentation] Remove a flow, list to validate the result. [Tags] remove @@ -39,9 +48,18 @@ Remove a flow ... ${node} priority 1 etherType 0x800 nwDst ... 10.0.0.1/32 actions ${actions} ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} - Should Be Equal As Strings ${resp.status_code} 204 Response status code error + Should Be Equal As Strings ${resp.status_code} 204 ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Not Contain Value ${content} ${body} +Check flow is not in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Not Contain ${resp.content} ${FLOW} + diff --git a/test/csit/suites/vtn/020__forwarding_rules_manager.txt b/test/csit/suites/vtn/020__forwarding_rules_manager.txt index 1dcb2a4838..390949a4cd 100644 --- a/test/csit/suites/vtn/020__forwarding_rules_manager.txt +++ b/test/csit/suites/vtn/020__forwarding_rules_manager.txt @@ -12,6 +12,8 @@ ${name} flow1 ${key} flowConfig ${node_id} 00:00:00:00:00:00:00:02 ${REST_CONTEXT} /controller/nb/v2/flowprogrammer +${REST_CONTEXT_ST} /controller/nb/v2/statistics +${FLOW} "10.0.0.1" *** Test Cases *** Add a flow @@ -23,13 +25,20 @@ Add a flow ... ${node} priority 1 etherType 0x800 nwDst ... 10.0.0.1/32 actions ${actions} ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body} - Should Be Equal As Strings ${resp.status_code} 201 Response status code error + Should Be Equal As Strings ${resp.status_code} 201 ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Contain Value ${content} ${body} - +Check flow in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Contain ${resp.content} ${FLOW} Remove a flow [Documentation] Remove a flow, list to validate the result. [Tags] remove @@ -39,9 +48,18 @@ Remove a flow ... ${node} priority 1 etherType 0x800 nwDst ... 10.0.0.1/32 actions ${actions} ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} - Should Be Equal As Strings ${resp.status_code} 204 Response status code error + Should Be Equal As Strings ${resp.status_code} 204 ${resp} Get session ${REST_CONTEXT}/${CONTAINER} - Should Be Equal As Strings ${resp.status_code} 200 Response status code error + Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} ${content} Get From Dictionary ${result} ${key} List Should Not Contain Value ${content} ${body} +Check flow is not in flow stats + [Documentation] Show flow stats and validate result + [Tags] get + Sleep 10 + ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Not Contain ${resp.content} ${FLOW} +