Update fan test verification
On Barreleye system, the current device driver doesn't expose
the controller's "Target" and it is intended to remain that way.
To make the test code verification compatible on all the supported
systems, the missing "Target" property is ignored if not found on
the system under test.
Resolves openbmc/openbmc-test-automation#615
Change-Id: I5e53c206dad5611c81f9f302ca6842c354f1e0a0
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_fan.robot b/tests/test_fan.robot
index 188a8cc..2e950c1 100644
--- a/tests/test_fan.robot
+++ b/tests/test_fan.robot
@@ -28,7 +28,8 @@
\ ${resp}= OpenBMC Get Request ${entry}
\ ${json}= To Json ${resp.content}
\ Should Be True ${json["data"]["Scale"]} >= 0
- \ Should Be True ${json["data"]["Target"]} >= 0
+ \ Run Keyword And Ignore Error
+ ... Should Be True ${json["data"]["Target"]} >= 0
\ Should Be Equal As Strings
... ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.RPMS
\ Should Be True ${json["data"]["Value"]} >= 0