Added test case to verify inventory URLs after multiple reboots.
Adding
1. Keyword 'Verify Inventory List Before And After Reboot'
2. Test Case 'Verify Inventory List After Reboot'
Resolves openbmc/openbmc-test-automation#705
Change-Id: I532ea74bece1ec22a768c8e06e86302c8ddc08f4
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 1d64b5a..f35c97d 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -5,6 +5,7 @@
Resource ../lib/utils.robot
Resource ../lib/state_manager.robot
Resource ../lib/openbmc_ffdc.robot
+Resource ../lib/list_utils.robot
Library ../lib/utilities.py
Variables ../data/variables.py
@@ -15,6 +16,10 @@
Force Tags Inventory
+***Variables***
+
+${LOOP_COUNT} ${1}
+
*** Test Cases ***
Verify System Inventory Path
@@ -213,6 +218,11 @@
\ Should Be True ${present}
... msg=${fan_uri} is functional but "Present" is not set.
+Verify Inventory List After Reboot
+ [Documentation] Verify Inventory List After Reboot
+ [Tags] Verify_Inventory_List_After_Reboot
+
+ Repeat Keyword ${LOOP_COUNT} times Verify Inventory List Before And After Reboot
Check Air Or Water Cooled
[Documentation] Check if this system is Air or water cooled.
@@ -323,3 +333,14 @@
# /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0
${state}= Read Attribute ${url_path} Functional
Should Be True ${state}
+
+Verify Inventory List Before And After Reboot
+ [Documentation] Verify Inventory list before and after reboot.
+
+ Initiate Host Boot
+ Wait Until Keyword Succeeds 10 min 10 sec Is OS Starting
+ ${inv_before}= Get URL List ${HOST_INVENTORY_URI}
+ Initiate Host Reboot
+ Wait Until Keyword Succeeds 10 min 10 sec Is OS Starting
+ ${inv_after}= Get URL List ${HOST_INVENTORY_URI}
+ Lists Should Be Equal ${inv_before} ${inv_after}