Pgood automation for MFG Stage2
This change addresses:
1. Verify pgood when power on using REST.
2. Verify pgood when power off using REST.
Resolves openbmc/openbmc-test-automation/issues#344
Change-Id: Ifbc083f37b74001d44ee1e243ce8bdadd89bf010
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
diff --git a/mnfg/pgood.robot b/mnfg/pgood.robot
new file mode 100644
index 0000000..f72cccf
--- /dev/null
+++ b/mnfg/pgood.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+
+Documentation This test suite verifies pgood state.
+
+Resource ../lib/rest_client.robot
+Resource ../lib/utils.robot
+Resource ../lib/state_manager.robot
+
+Variables ../data/variables.py
+
+*** Variables ***
+
+${POWER_URI} ${CONTROL_URI}/power0/
+
+*** Test Cases ***
+
+Verify PGood When Power On Using REST
+ [Documentation] Verify pgood state on good power supply.
+ [Tags] Verify_PGood_When_Power_On_Using_REST
+
+ # Initiate Host poweron using rest commands.
+ Initiate Host Boot 1
+ ${data}= Read Attribute ${POWER_URI} pgood
+
+ Should Be Equal As Integers ${data} 1
+
+Verify PGood When Power Off Using REST
+ [Documentation] Verify pgood state on bad power supply.
+ [Tags] Verify_PGood_When_Power_Off_Using_REST
+
+ # Initiate Host poweroff using rest commands.
+ Initiate Host PowerOff 1
+ ${data}= Read Attribute ${POWER_URI} pgood
+
+ Should Be Equal As Integers ${data} 0
+