[PATCH openbmc-test-automation 24/60] Added firmware version validation test

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


From: Manjunath A Kumatagi <mkumatag at in.ibm.com>

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

diff --git a/tests/test_fw_version.robot b/tests/test_fw_version.robot
new file mode 100644
index 0000000..2c3337d
--- /dev/null
+++ b/tests/test_fw_version.robot
@@ -0,0 +1,22 @@
+*** Settings ***
+Documentation       This suite will the firmware version exposed part of
+...                 system inventory
+
+Resource            ../lib/rest_client.robot
+
+
+*** Variables ***
+
+
+*** Test Cases ***
+Test Firmware Version
+    [Documentation]     This testcase is for testing the fw version.\n
+    ...     Expected in following format:
+    ...     $ git describe --dirty
+    ...     v0.1-34-g95f7347
+    ...     $
+    ${resp} =    OpenBMC Get Request    /org/openbmc/inventory/system
+    Should Be Equal As Strings    ${resp.status_code}    ${HTTP_OK}
+    ${jsondata}=    To Json    ${resp.content}
+    Should not be empty     ${jsondata["data"]["Version"]}
+    Should Match Regexp     ${jsondata["data"]["Version"]}      ^v\\d+\.\\d+
\ No newline at end of file
-- 
2.6.4




More information about the openbmc mailing list