From: OpenBMC Patches <openbmc-patches@stwcx.xyz>
To: openbmc@lists.ozlabs.org
Subject: [PATCH openbmc-test-automation 26/60] Fix errors
Date: Mon, 11 Jan 2016 10:49:52 -0600 [thread overview]
Message-ID: <1452531026-13715-27-git-send-email-openbmc-patches@stwcx.xyz> (raw)
In-Reply-To: <1452531026-13715-1-git-send-email-openbmc-patches@stwcx.xyz>
From: Manjunath A Kumatagi <mkumatag@in.ibm.com>
---
lib/rest_client.robot | 5 +--
tests/test_fan.robot | 3 --
tests/test_inventory.robot | 4 +--
tests/test_sensors.robot | 84 ++++++++++++++++------------------------------
4 files changed, 33 insertions(+), 63 deletions(-)
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index f0c1ba3..5cd71b2 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -106,7 +106,8 @@ Logging
Read Attribute
[arguments] ${uri} ${attr}
${resp} = OpenBMC Get Request ${uri}/attr/${attr}
- [return] ${resp.content}
+ ${content}= To Json ${resp.content}
+ [return] ${content["data"]}
Read Properties
@@ -114,4 +115,4 @@ Read Properties
${resp} = OpenBMC Get Request ${uri}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${content}= To Json ${resp.content}
- [return] ${content}
\ No newline at end of file
+ [return] ${content["data"]}
\ No newline at end of file
diff --git a/tests/test_fan.robot b/tests/test_fan.robot
index 61255e6..2f593b5 100644
--- a/tests/test_fan.robot
+++ b/tests/test_fan.robot
@@ -4,6 +4,3 @@ Suite Teardown Delete All Sessions
Resource ../lib/rest_client.robot
*** Test Cases ***
-List all the fans
- ${resp} = OpenBMC Get Request /org.openbmc.control.Fan/
- Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index afe4613..3bb8f9c 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -13,14 +13,14 @@ List Inventory
${jsondata}= To Json ${resp.content}
${ret}= Get Inventory Schema ${MACHINE_TYPE}
: FOR ${ELEMENT} IN @{ret}
- \ Should Contain ${jsondata} ${ELEMENT}
+ \ Should Contain ${jsondata["data"]} ${ELEMENT}
Verify dimm vpd
: FOR ${INDEX} IN RANGE 0 4
\ log ${INDEX}
\ ${value} = Read Attribute /org/openbmc/inventory/system/chassis/motherboard/dimm${INDEX} fru_type
- \ Should Be Equal ${value} "DIMM"
+ \ Should Be Equal ${value} DIMM
Verify dimm vpd properties
diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index 3e84e44..945fb47 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -21,158 +21,134 @@ Verify connection
Execute new Command echo "hello"
Response Should Be Equal "hello"
-
Execute ipmi BT capabilities command
Run IPMI command 0x06 0x36
response Should Be Equal " 01 3f 3f 0a 01"
-
Execute Set Sensor boot count
Run IPMI command 0x04 0x30 0x09 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00
Read the Attribute /org/openbmc/sensor/virtual/BootCount value
- Response Should Be Equal "53"
-
+ Response Should Be Equal 53
Set Sensor Boot progress
Run IPMI command 0x04 0x30 0x05 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x14 0x00
Read the Attribute /org/openbmc/sensor/virtual/BootProgress value
- Response Should Be Equal "FW Progress, Baseboard Init"
-
-
+ Response Should Be Equal FW Progress, Baseboard Init
Set Sensor Boot progress Longest string
Run IPMI command 0x04 0x30 0x05 0xa9 0x00 0x04 0x00 0x00 0x00 0x00 0x0e 0x00
Read The Attribute /org/openbmc/sensor/virtual/BootProgress value
- Response Should Be Equal "FW Progress, Docking station attachment"
-
+ Response Should Be Equal FW Progress, Docking station attachment
BootProgress sensor FW Hang unspecified Error
Run IPMI command 0x04 0x30 0x05 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00
Read The Attribute /org/openbmc/sensor/virtual/BootProgress value
- Response Should Be Equal "FW Hang, Unspecified"
-
+ Response Should Be Equal FW Hang, Unspecified
BootProgress fw hang state
Run IPMI command 0x04 0x30 0x05 0xa9 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/sensor/virtual/BootProgress value
- Response Should Be Equal "POST Error, unknown"
-
+ Response Should Be Equal POST Error, unknown
OperatingSystemStatus Sensor boot completed progress
Run IPMI command 0x04 0x30 0x32 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/sensor/virtual/OperatingSystemStatus value
- Response Should Be Equal "Boot completed (00)"
-
+ Response Should Be Equal Boot completed (00)
OperatingSystemStatus Sensor progress
Run IPMI command 0x04 0x30 0x32 0x00 0x00 0x04 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/sensor/virtual/OperatingSystemStatus value
- Response Should Be Equal "PXE boot completed"
-
+ Response Should Be Equal PXE boot completed
OCC Active sensor on enabled
Run IPMI command 0x04 0x30 0x08 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/sensor/virtual/OccStatus value
- Response Should Be Equal "Enabled"
-
+ Response Should Be Equal Enabled
OCC Active sensor on disabled
Run IPMI command 0x04 0x30 0x08 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/sensor/virtual/OccStatus value
- Response Should Be Equal "Disabled"
-
+ Response Should Be Equal Disabled
CPU Present
Run IPMI command 0x04 0x30 0x2f 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0 present
- Response Should Be Equal "True"
+ Response Should Be Equal True
CPU not Present
Run IPMI command 0x04 0x30 0x2f 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0 present
- Response Should Be Equal "False"
-
+ Response Should Be Equal False
CPU fault
Run IPMI command 0x04 0x30 0x2f 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0 fault
- Response Should Be Equal "True"
-
+ Response Should Be Equal True
CPU no fault
Run IPMI command 0x04 0x30 0x2f 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0 fault
- Response Should Be Equal ""
-
+ Response Should Be Empty
core Present
Run IPMI command 0x04 0x30 0x2d 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11 present
- Response Should Be Equal "True"
+ Response Should Be Equal True
core not Present
Run IPMI command 0x04 0x30 0x2d 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11 present
- Response Should Be Equal "False"
-
+ Response Should Be Equal False
core fault
Run IPMI command 0x04 0x30 0x2d 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11 fault
- Response Should Be Equal "True"
-
+ Response Should Be Equal True
core no fault
Run IPMI command 0x04 0x30 0x2d 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/cpu0/core11 fault
- Response Should Be Equal ""
-
+ Response Should Be Empty
DIMM3 Present
Run IPMI command 0x04 0x30 0x21 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/dimm3 present
- Response Should Be Equal "True"
+ Response Should Be Equal True
DIMM3 not Present
Run IPMI command 0x04 0x30 0x21 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/dimm3 present
- Response Should Be Equal "False"
-
+ Response Should Be Equal False
DIMM0 fault
Run IPMI command 0x04 0x30 0x1e 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/dimm0 fault
- Response Should Be Equal "True"
-
+ Response Should Be Equal True
DIMM0 no fault
Run IPMI command 0x04 0x30 0x1e 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/dimm0 fault
- Response Should Be Equal ""
-
-
+ Response Should Be Empty
Centaur0 Present
Run IPMI command 0x04 0x30 0x2e 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/centaur0 present
- Response Should Be Equal "True"
+ Response Should Be Equal True
Centaur0 not Present
Run IPMI command 0x04 0x30 0x2e 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/centaur0 present
- Response Should Be Equal "False"
-
+ Response Should Be Equal False
Centaur0 fault
Run IPMI command 0x04 0x30 0x2e 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/centaur0 fault
- Response Should Be Equal "True"
+ Response Should Be Equal True
Centaur0 no fault
Run IPMI command 0x04 0x30 0x2e 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
Read The Attribute /org/openbmc/inventory/system/chassis/motherboard/centaur0 fault
- Response Should Be Equal ""
-
+ Response Should Be Empty
*** Keywords ***
@@ -185,15 +161,13 @@ response Should Be Equal
[arguments] ${args}
Should Be Equal ${OUTPUT} ${args}
+Response Should Be Empty
+ Should Be Empty ${OUTPUT}
Read the Attribute
[arguments] ${uri} ${parm}
${output} = Read Attribute ${uri} ${parm}
- ${json} = to json ${output}
- ${data} = get from dictionary ${json} data
- set test variable ${OUTPUT} "${data}"
-
-
+ set test variable ${OUTPUT} ${output}
Open Connection And Log In
Open connection ${OPENBMC_HOST}
@@ -203,5 +177,3 @@ Run IPMI Command
[arguments] ${args}
${output}= Execute Command /usr/sbin/ipmitool -I dbus raw ${args}
set test variable ${OUTPUT} "${output}"
-
-
--
2.6.4
next prev parent reply other threads:[~2016-01-11 16:51 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 16:49 [PATCH openbmc-test-automation 00/60] Pull Manjunath's automation repository OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 01/60] first commit OpenBMC Patches
2016-01-12 4:18 ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 02/60] added files OpenBMC Patches
2016-01-12 4:20 ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 03/60] Update README.md OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 04/60] added log statement OpenBMC Patches
2016-01-12 4:20 ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 05/60] added testcase for etc passwd OpenBMC Patches
2016-01-12 4:20 ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 06/60] Added git ignore file OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 07/60] Use argumnet file with pyrobot and added instructions to READEME file OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 08/60] Update README for better html display OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 09/60] Added Inventory list testcase OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 10/60] Added DIMM specific inventory tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 11/60] base add for sensor tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 12/60] fixed errors in tox and generate_argumentfile.sh script OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 13/60] fixed review comments OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 14/60] created loops for tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 15/60] Add initial rest test cases Support to test Null properties OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 16/60] Moved Read Attribute and Read Properties to rest_client OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 17/60] fix review comment OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 18/60] Added full sensor suite OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 19/60] Update README.md OpenBMC Patches
2016-01-12 4:21 ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 20/60] Added SSL tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 21/60] Handle new rest client from Brad OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 22/60] Ran the tests and fixed errors in SSL tests OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 23/60] Modified the doc OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 24/60] Added firmware version validation test OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 25/60] update readme file with tox version OpenBMC Patches
2016-01-11 16:49 ` OpenBMC Patches [this message]
2016-01-11 16:49 ` [PATCH openbmc-test-automation 27/60] Fix Errors in test_obmcrest.robot and removed the empty testcases OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 28/60] Added one more testcase to test non-ssl connection to port 443 OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 29/60] OpenBMC REST Testing OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 30/60] updated the REST API for firmware version OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 31/60] first commit OpenBMC Patches
2016-01-12 5:07 ` Stewart Smith
2016-01-11 16:49 ` [PATCH openbmc-test-automation 32/60] added files OpenBMC Patches
2016-01-11 16:49 ` [PATCH openbmc-test-automation 33/60] Update README.md OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 34/60] added log statement OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 35/60] added testcase for etc passwd OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 36/60] Added git ignore file OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 37/60] Use argumnet file with pyrobot and added instructions to READEME file OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 38/60] Update README for better html display OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 39/60] Added Inventory list testcase OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 40/60] Added DIMM specific inventory tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 41/60] base add for sensor tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 42/60] fixed errors in tox and generate_argumentfile.sh script OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 43/60] fixed review comments OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 44/60] created loops for tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 45/60] Add initial rest test cases Support to test Null properties OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 46/60] Moved Read Attribute and Read Properties to rest_client OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 47/60] fix review comment OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 48/60] Added full sensor suite OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 49/60] Update README.md OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 50/60] Added SSL tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 51/60] Handle new rest client from Brad OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 52/60] Ran the tests and fixed errors in SSL tests OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 53/60] Modified the doc OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 54/60] Added firmware version validation test OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 55/60] update readme file with tox version OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 56/60] Fix errors OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 57/60] Fix Errors in test_obmcrest.robot and removed the empty testcases OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 58/60] Added one more testcase to test non-ssl connection to port 443 OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 59/60] OpenBMC REST Testing OpenBMC Patches
2016-01-11 16:50 ` [PATCH openbmc-test-automation 60/60] updated the REST API for firmware version OpenBMC Patches
2016-01-12 0:00 ` [PATCH openbmc-test-automation 00/60] Pull Manjunath's automation repository Daniel Axtens
2016-01-12 0:10 ` Cyril Bur
2016-01-12 9:35 ` Manjunath A Kumatagi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452531026-13715-27-git-send-email-openbmc-patches@stwcx.xyz \
--to=openbmc-patches@stwcx.xyz \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.