Boot host before running the test
The inventory and sensor objects are not loaded until host is
powered on. The test was not failing earlier because it was
executed post power on by previous test suites in a CT run.
Resolves openbmc/openbmc-test-automation#463
Change-Id: I2bcdcfd30cbfafb40fc512119f2983ab02ec63f5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index d6cfb3f..3967345 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -8,6 +8,7 @@
Resource ../lib/rest_client.robot
Resource ../lib/ipmi_client.robot
Resource ../lib/openbmc_ffdc.robot
+Resource ../lib/state_manager.robot
Library ../data/model.py
Suite setup Setup The Suite
@@ -318,6 +319,13 @@
*** Keywords ***
Setup The Suite
+ [Documentation] Do the initial suite setup.
+ ${current_state}= Get Host State
+ Run Keyword If '${current_state}' == 'Off'
+ ... Initiate Host Boot
+
+ Wait Until Keyword Succeeds
+ ... 10 min 10 sec Is OS Starting
Open Connection And Log In
${resp}= Read Properties ${OPENBMC_BASE_URI}enumerate timeout=30