[PATCH openbmc-test-automation 15/60] Add initial rest test cases Support to test Null properties

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Jan 12 03:49:41 AEDT 2016


From: Chris Austen <austenc at us.ibm.com>

---
 tests/test_obmcrest.robot | 65 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 tests/test_obmcrest.robot

diff --git a/tests/test_obmcrest.robot b/tests/test_obmcrest.robot
new file mode 100644
index 0000000..0c3d5ea
--- /dev/null
+++ b/tests/test_obmcrest.robot
@@ -0,0 +1,65 @@
+*** Settings ***
+Documentation		This suite will verifiy all OpenBMC rest interfaces
+...					Details of valid interfaces can be found here...
+...					https://github.com/openbmc/docs/blob/master/rest-api.md
+
+Resource		../lib/rest_client.robot
+
+
+*** Variables ***
+
+
+*** Test Cases ***
+Good connection for testing
+	${resp} =	Read Properties	/
+	${jdata}=	To Json 	${resp.content}
+	${c}= 		get from List 	${jdata} 	0
+	Should Contain		"/org"	${c}	
+
+
+Get an object with no properties 
+	${resp} =	Read Properties	/org/openbmc/inventory
+	Should Be Empty	${resp.content}
+
+
+Get a Property
+	${resp} =	Read attribute	/org/openbmc/inventory/system/chassis/motherboard/cpu0	is_fru
+	Should Contain		1	${resp}	
+
+
+Get a null Property
+	${resp} =	Read attribute	/org/openbmc/inventory	is_fru
+	Should Contain		1	${resp}	
+
+
+Enumeration object
+
+
+List object
+
+
+Invoke a method without properties
+
+
+Invoke a method with properties
+
+
+Issue a POST
+
+
+Issue a PUT
+
+
+
+
+
+*** Keywords ***
+Read Properties
+	[arguments]	${uri}
+	${resp} =	OpenBMC Get Request	${uri}
+	[return]	${resp}
+
+Read attribute
+	[arguments]	${uri}	${attr}
+	${resp} =	OpenBMC Get Request	${uri}/attr/${attr}
+	[return]	${resp.content}
\ No newline at end of file
-- 
2.6.4




More information about the openbmc mailing list