Boxelder inventory test
Added:
- Verify Boxelder Present Property
- Verify Boxelder MAC Address Property Is Populated
Resolves openbmc/openbmc-test-automation#795
Change-Id: Ie3579b393f50dc5ecd4ae754d2716abfd0ee1cb5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/test_lists/skip_test_barreleye b/test_lists/skip_test_barreleye
index 81092ed..e64361d 100644
--- a/test_lists/skip_test_barreleye
+++ b/test_lists/skip_test_barreleye
@@ -57,3 +57,6 @@
-e Verify_Setting_OCC_Turbo_Via_REST
-e Check_BMC_FSI_Compatible_Property_Is_Set
-e Check_BMC_FSI_Name_Property_Is_Set
+# Applicable only for witherspoon
+-e Verify_Boxelder_Present_Property
+-e Verify_Boxelder_MAC_Address_Property_Is_Populated
diff --git a/test_lists/skip_test_palmetto b/test_lists/skip_test_palmetto
index e705fff..e7fa25e 100644
--- a/test_lists/skip_test_palmetto
+++ b/test_lists/skip_test_palmetto
@@ -64,3 +64,6 @@
-e Verify_Setting_OCC_Turbo_Via_REST
-e Check_BMC_FSI_Compatible_Property_Is_Set
-e Check_BMC_FSI_Name_Property_Is_Set
+# Applicable only for witherspoon
+-e Verify_Boxelder_Present_Property
+-e Verify_Boxelder_MAC_Address_Property_Is_Populated
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index a2cbd60..45d12b9 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -30,6 +30,52 @@
Get Inventory system
+Verify Boxelder Present Property
+ [Documentation] Boxelder should be present by default.
+ [Tags] Verify that boxelder 'Present' property is present by default.
+ # Example:
+ # "/xyz/openbmc_project/inventory/system/chassis/motherboard/boxelder/bmc":
+ # {
+ # "BuildDate": "",
+ # "FieldReplaceable": 0,
+ # "Manufacturer": "IBM",
+ # "Model": "",
+ # "PartNumber": "01DH051",
+ # "Present": 1,
+ # "PrettyName": "BMC PLANAR ",
+ # "SerialNumber": "000000000000"
+ # },
+ ${json_data}= Get Inventory system/chassis/motherboard/boxelder/bmc
+ Should Be True ${json_data["data"]["Present"]}
+
+
+Verify Boxelder MAC Address Property Is Populated
+ [Documentation] Boxelder should be present by default.
+ [Tags] Verify_Boxelder_MAC_Address_Property_Is_Populated
+ # Example:
+ # /xyz/openbmc_project/inventory/system/chassis/motherboard/boxelder/bmc/ethernet
+ # {
+ # "FieldReplaceable": 0,
+ # "MACAddress": "00:00:00:00:00:00",
+ # "Present": 1,
+ # "PrettyName": ""
+ # }
+
+ ${json_data}= Get Inventory
+ ... system/chassis/motherboard/boxelder/bmc/ethernet
+ Should Be True ${json_data["data"]["Present"]}
+ Should Not Be Equal As Strings
+ ... ${json_data["data"]["MACAddress"]} 00:00:00:00:00:00
+
+ # eth0 Link encap:Ethernet HWaddr 70:E2:84:14:23:F9
+ ${mac_addr} ${stderr} ${rc}= BMC Execute Command
+ ... /sbin/ifconfig -a | grep HWaddr | awk -F'HWaddr ' '{print $2}'
+ ... return_stderr=True
+ Should Be Empty ${stderr}
+ Should Be Equal As Strings ${json_data["data"]["MACAddress"]} ${mac_addr}
+ ... msg=MAC address configured incorrectly.
+
+
Verify Chassis Motherboard Properties
[Documentation] Check if chassis motherboard properties are
... populated valid.