From bb199955ae2095fca2aa4e0be6b352fdcf444245 Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Fri, 15 Nov 2013 14:17:03 -0800 Subject: [PATCH] Test csit test cases Change-Id: If73b201949b9d4fe3f7b6da2744be03c18c38f95 Signed-off-by: Luis Gomez --- .../cases/base/01__Switch_Manager/log.html | 1863 +++++++++++++++ .../cases/base/01__Switch_Manager/output.xml | 135 ++ .../cases/base/01__Switch_Manager/report.html | 2043 +++++++++++++++++ .../cases/base/01__Switch_Manager/test.txt | 18 + .../cases/base/02__Topology_Manager/log.html | 1863 +++++++++++++++ .../base/02__Topology_Manager/output.xml | 171 ++ .../base/02__Topology_Manager/report.html | 2043 +++++++++++++++++ .../cases/base/02__Topology_Manager/test.txt | 20 + 8 files changed, 8156 insertions(+) create mode 100755 test/csit/cases/base/01__Switch_Manager/log.html create mode 100755 test/csit/cases/base/01__Switch_Manager/output.xml create mode 100755 test/csit/cases/base/01__Switch_Manager/report.html create mode 100755 test/csit/cases/base/01__Switch_Manager/test.txt create mode 100755 test/csit/cases/base/02__Topology_Manager/log.html create mode 100755 test/csit/cases/base/02__Topology_Manager/output.xml create mode 100755 test/csit/cases/base/02__Topology_Manager/report.html create mode 100755 test/csit/cases/base/02__Topology_Manager/test.txt diff --git a/test/csit/cases/base/01__Switch_Manager/log.html b/test/csit/cases/base/01__Switch_Manager/log.html new file mode 100755 index 00000000..e6020e04 --- /dev/null +++ b/test/csit/cases/base/01__Switch_Manager/log.html @@ -0,0 +1,1863 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/csit/cases/base/01__Switch_Manager/output.xml b/test/csit/cases/base/01__Switch_Manager/output.xml new file mode 100755 index 00000000..7222d074 --- /dev/null +++ b/test/csit/cases/base/01__Switch_Manager/output.xml @@ -0,0 +1,135 @@ + + + + + +Returns the given values which can then be assigned to a variables. + +"node":{"type":"OF","id":"00:00:00:00:00:00:00:01"} + +${node1} = "node":{"type":"OF","id":"00:00:00:00:00:00:00:01"} + + + +Returns the given values which can then be assigned to a variables. + +"node":{"type":"OF","id":"00:00:00:00:00:00:00:02"} + +${node2} = "node":{"type":"OF","id":"00:00:00:00:00:00:00:02"} + + + +Returns the given values which can then be assigned to a variables. + +"node":{"type":"OF","id":"00:00:00:00:00:00:00:03"} + +${node3} = "node":{"type":"OF","id":"00:00:00:00:00:00:00:03"} + + + +Returns a list containing given items. + +admin +admin + +${auth} = [u'admin', u'admin'] + + + +Creates and returns a dictionary based on given items. + +Content-Type +application/json + +${headers} = {u'Content-Type': u'application/json'} + + + +Create Session: create a HTTP session to a server + +controller +http://10.125.136.52:8080 +headers=${headers} +auth=${auth} + +Argument types are: +<type 'bool'> + + + +Send a GET request on the session object found using the + +controller +/controller/nb/v2/switchmanager/default/nodes + +Starting new HTTP connection (1): 10.125.136.52 +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<type 'int'> +<type 'unicode'> + + + +Logs the given message with the given level. + +${resp.content} + +{"nodeProperties":[{"node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"properties":{"tables":{"value":-1},"forwarding":{"value":0},"timeStamp":{"value":1384313779597,"name":"connectedSince"},"buffers":{"value":256},"description":{"value":"None"},"capabilities":{"value":199},"macAddress":{"value":"00:00:00:00:00:02"},"supportedFlowActions":{"value":"[Controller, Drop, Enqueue, HwPath, Output, PopVlan, SetDlDst, SetDlSrc, SetNwDst, SetNwSrc, SetNwTos, SetTpDst, SetTpSrc, SetVlanId, SetVlanPcp, SwPath]"}}},{"node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"properties":{"tables":{"value":-1},"forwarding":{"value":0},"timeStamp":{"value":1384313779656,"name":"connectedSince"},"buffers":{"value":256},"description":{"value":"None"},"capabilities":{"value":199},"macAddress":{"value":"00:00:00:00:00:03"},"supportedFlowActions":{"value":"[Controller, Drop, Enqueue, HwPath, Output, PopVlan, SetDlDst, SetDlSrc, SetNwDst, SetNwSrc, SetNwTos, SetTpDst, SetTpSrc, SetVlanId, SetVlanPcp, SwPath]"}}},{"node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"properties":{"tables":{"value":-1},"forwarding":{"value":0},"timeStamp":{"value":1384313779539,"name":"connectedSince"},"buffers":{"value":256},"description":{"value":"None"},"macAddress":{"value":"00:00:00:00:00:01"},"capabilities":{"value":199},"supportedFlowActions":{"value":"[Controller, Drop, Enqueue, HwPath, Output, PopVlan, SetDlDst, SetDlSrc, SetNwDst, SetNwSrc, SetNwTos, SetTpDst, SetTpSrc, SetVlanId, SetVlanPcp, SwPath]"}}}]} + + + +Fails if `item1` does not contain `item2` one or more times. + +${resp.content} +${node1} + + + + +Fails if `item1` does not contain `item2` one or more times. + +${resp.content} +${node2} + + + + +Fails if `item1` does not contain `item2` one or more times. + +${resp.content} +${node3} + + + + + + + + + + + + + + + +Critical Tests +All Tests + + + + +Test + + + + + diff --git a/test/csit/cases/base/01__Switch_Manager/report.html b/test/csit/cases/base/01__Switch_Manager/report.html new file mode 100755 index 00000000..d38a185d --- /dev/null +++ b/test/csit/cases/base/01__Switch_Manager/report.html @@ -0,0 +1,2043 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework report failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/csit/cases/base/01__Switch_Manager/test.txt b/test/csit/cases/base/01__Switch_Manager/test.txt new file mode 100755 index 00000000..51e2a551 --- /dev/null +++ b/test/csit/cases/base/01__Switch_Manager/test.txt @@ -0,0 +1,18 @@ +*** Settings *** +Library Collections +Library RequestsLibrary + +*** Testcases *** +Get Nodes + ${node1}= Set Variable "node":{"type":"OF","id":"00:00:00:00:00:00:00:01"} + ${node2}= Set Variable "node":{"type":"OF","id":"00:00:00:00:00:00:00:02"} + ${node3}= Set Variable "node":{"type":"OF","id":"00:00:00:00:00:00:00:03"} + ${auth}= Create List admin admin + ${headers}= Create Dictionary Content-Type application/json + Create Session controller http://10.125.136.52:8080 headers=${headers} auth=${auth} + ${resp}= Get controller /controller/nb/v2/switchmanager/default/nodes + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.content} + Should Contain ${resp.content} ${node1} + Should Contain ${resp.content} ${node2} + Should Contain ${resp.content} ${node3} diff --git a/test/csit/cases/base/02__Topology_Manager/log.html b/test/csit/cases/base/02__Topology_Manager/log.html new file mode 100755 index 00000000..dfaf770f --- /dev/null +++ b/test/csit/cases/base/02__Topology_Manager/log.html @@ -0,0 +1,1863 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/csit/cases/base/02__Topology_Manager/output.xml b/test/csit/cases/base/02__Topology_Manager/output.xml new file mode 100755 index 00000000..381ecfe9 --- /dev/null +++ b/test/csit/cases/base/02__Topology_Manager/output.xml @@ -0,0 +1,171 @@ + + + + + +Returns the given values which can then be assigned to a variables. + +NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"} + +${nodeconn1} = NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"} + + + +Returns the given values which can then be assigned to a variables. + +NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"} + +${nodeconn2} = NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"} + + + +Returns the given values which can then be assigned to a variables. + +NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"} + +${nodeconn3} = NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"} + + + +Returns the given values which can then be assigned to a variables. + +NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"} + +${nodeconn4} = NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"} + + + +Returns a list containing given items. + +admin +admin + +${auth} = [u'admin', u'admin'] + + + +Creates and returns a dictionary based on given items. + +Content-Type +application/json + +${headers} = {u'Content-Type': u'application/json'} + + + +Create Session: create a HTTP session to a server + +controller +http://10.125.136.52:8080 +headers=${headers} +auth=${auth} + +Argument types are: +<type 'bool'> + + + +Send a GET request on the session object found using the + +controller +/controller/nb/v2/topology/default + +Starting new HTTP connection (1): 10.125.136.52 +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<type 'int'> +<type 'unicode'> + + + +Logs the given message with the given level. + +${resp.content} + +{"edgeProperties":[{"edge":{"tailNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"},"headNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"}},"properties":{"timeStamp":{"value":1384314687750,"name":"creation"},"name":{"value":"s3-eth3"},"state":{"value":1},"config":{"value":1},"bandwidth":{"value":10000000000}}},{"edge":{"tailNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"},"headNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"}},"properties":{"timeStamp":{"value":1384314688556,"name":"creation"},"name":{"value":"s1-eth2"},"state":{"value":1},"config":{"value":1},"bandwidth":{"value":10000000000}}},{"edge":{"tailNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"},"headNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"}},"properties":{"timeStamp":{"value":1384314688555,"name":"creation"},"name":{"value":"s1-eth1"},"state":{"value":1},"config":{"value":1},"bandwidth":{"value":10000000000}}},{"edge":{"tailNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"},"headNodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"}},"properties":{"timeStamp":{"value":1384314687852,"name":"creation"},"name":{"value":"s2-eth3"},"state":{"value":1},"config":{"value":1},"bandwidth":{"value":10000000000}}}]} + + + +Fails if `item1` does not contain `item2` `count` times. + +${resp.content} +${nodeconn1} +2 + +Item found from the first item 2 times +Argument types are: +<type 'int'> +<type 'unicode'> + + + +Fails if `item1` does not contain `item2` `count` times. + +${resp.content} +${nodeconn2} +2 + +Item found from the first item 2 times +Argument types are: +<type 'int'> +<type 'unicode'> + + + +Fails if `item1` does not contain `item2` `count` times. + +${resp.content} +${nodeconn3} +2 + +Item found from the first item 2 times +Argument types are: +<type 'int'> +<type 'unicode'> + + + +Fails if `item1` does not contain `item2` `count` times. + +${resp.content} +${nodeconn4} +2 + +Item found from the first item 2 times +Argument types are: +<type 'int'> +<type 'unicode'> + + + + + + + + + + + + + + +Critical Tests +All Tests + + + + +Test + + + + + diff --git a/test/csit/cases/base/02__Topology_Manager/report.html b/test/csit/cases/base/02__Topology_Manager/report.html new file mode 100755 index 00000000..a2d4113c --- /dev/null +++ b/test/csit/cases/base/02__Topology_Manager/report.html @@ -0,0 +1,2043 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework report failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/csit/cases/base/02__Topology_Manager/test.txt b/test/csit/cases/base/02__Topology_Manager/test.txt new file mode 100755 index 00000000..1739f7ec --- /dev/null +++ b/test/csit/cases/base/02__Topology_Manager/test.txt @@ -0,0 +1,20 @@ +*** Settings *** +Library Collections +Library RequestsLibrary + +*** Testcases *** +Get Topology + ${nodeconn1}= Set Variable NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"} + ${nodeconn2}= Set Variable NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"} + ${nodeconn3}= Set Variable NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"} + ${nodeconn4}= Set Variable NodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"} + ${auth}= Create List admin admin + ${headers}= Create Dictionary Content-Type application/json + Create Session controller http://10.125.136.52:8080 headers=${headers} auth=${auth} + ${resp}= Get controller /controller/nb/v2/topology/default + 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 + Should Contain X Times ${resp.content} ${nodeconn3} 2 + Should Contain X Times ${resp.content} ${nodeconn4} 2 -- 2.36.6