More double slash URL fixes
Fix TCs that reference HOST_WATCHDOG_URI.
Fix TCs that reference DUMP_ENTRY_URI.
Fix TCs that reference SOFTWARE_VERSION_URI.
FiX TCs that reference HOST_INVENTORY_URI.
Fix 'Get Endpoint Paths' keyword.
Change-Id: I77e5818a05ef5960ab8b0ffe14c1684ec9bbee39
Signed-off-by: Steven Sombar <ssombar@us.ibm.com>
diff --git a/extended/code_update/test_image_upload.robot b/extended/code_update/test_image_upload.robot
index e6bf7ef..2403393 100644
--- a/extended/code_update/test_image_upload.robot
+++ b/extended/code_update/test_image_upload.robot
@@ -226,7 +226,7 @@
@{image}= Create List ${image_file_name} ${TFTP_SERVER}
${data}= Create Dictionary data=@{image}
${resp}= OpenBMC Post Request
- ... ${SOFTWARE_VERSION_URI}/action/DownloadViaTFTP data=${data}
+ ... ${SOFTWARE_VERSION_URI}action/DownloadViaTFTP data=${data}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Sleep 1 minute
${image_version}= Get Image Version From TFTP Server ${image_file_name}
@@ -261,7 +261,7 @@
@{image}= Create List ${bad_image_file_name} ${TFTP_SERVER}
${data}= Create Dictionary data=@{image}
${resp}= OpenBMC Post Request
- ... ${SOFTWARE_VERSION_URI}/action/DownloadViaTFTP data=${data}
+ ... ${SOFTWARE_VERSION_URI}action/DownloadViaTFTP data=${data}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${bad_image_version}= Get Image Version From TFTP Server
... ${bad_image_file_name}
diff --git a/extended/test_watchdog.robot b/extended/test_watchdog.robot
index 51c4613..1c05d9a 100644
--- a/extended/test_watchdog.robot
+++ b/extended/test_watchdog.robot
@@ -131,7 +131,7 @@
# "Interval":Integer, "TimeRemaining":Integer)
${valueDict}= Create Dictionary data=${value}
- ${resp}= OpenBMC Put Request ${HOST_WATCHDOG_URI}/attr/${setting_name}
+ ${resp}= OpenBMC Put Request ${HOST_WATCHDOG_URI}attr/${setting_name}
... data=${valueDict}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
diff --git a/lib/common_utils.robot b/lib/common_utils.robot
index 7c0d484..594cdd3 100755
--- a/lib/common_utils.robot
+++ b/lib/common_utils.robot
@@ -604,7 +604,7 @@
# openbmc_url URL for list operation (e.g.
# /xyz/openbmc_project/inventory).
- ${url_list}= Read Properties ${openbmc_url}/list quiet=${1}
+ ${url_list}= Read Properties ${openbmc_url}list quiet=${1}
Sort List ${url_list}
[Return] ${url_list}
diff --git a/lib/fan_utils.robot b/lib/fan_utils.robot
index dca4206..d00e236 100755
--- a/lib/fan_utils.robot
+++ b/lib/fan_utils.robot
@@ -11,7 +11,7 @@
[Documentation] Return 1 if system is water cooled, 0 othersise.
${water_cooled}= Read Attribute
- ... ${HOST_INVENTORY_URI}/system/chassis WaterCooled
+ ... ${HOST_INVENTORY_URI}system/chassis WaterCooled
[Return] ${water_cooled}
@@ -25,7 +25,7 @@
# fan_names The list of fan names to which new fan names are to be
# added to. This list is returned to the caller.
- ${fan_uris}= Get Endpoint Paths ${HOST_INVENTORY_URI}/system fan
+ ${fan_uris}= Get Endpoint Paths ${HOST_INVENTORY_URI}system fan
: FOR ${fan_uri} IN @{fan_uris}
\ ${fan_properties}= Read Properties ${fan_uri}
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 0bad5b7..65caed7 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -453,7 +453,7 @@
[Documentation] Collect dumps from dump entry.
[Arguments] ${log_prefix_path}=${LOG_PREFIX}
- ${data}= Read Properties ${DUMP_ENTRY_URI}/enumerate quiet=${1}
+ ${data}= Read Properties ${DUMP_ENTRY_URI}enumerate quiet=${1}
# Grab the list of entries from dump/entry/
# The data shown below is the result of the "Get Dictionary Keys".
diff --git a/lib/utils.robot b/lib/utils.robot
index 29afce2..86101b5 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -12,6 +12,7 @@
Library Process
Library OperatingSystem
Library gen_print.py
+Library gen_misc.py
Library gen_robot_print.py
Library gen_cmd.py
Library gen_robot_keyword.py
@@ -476,7 +477,10 @@
# path URL path for enumeration.
# endpoint Endpoint string (url path ending).
- ${resp}= Read Properties ${path}/enumerate timeout=30
+ # Make sure path ends with slash.
+ ${path}= Add Trailing Slash ${path}
+
+ ${resp}= Read Properties ${path}enumerate timeout=30
Log Dictionary ${resp}
${list}= Get Dictionary Keys ${resp}
diff --git a/mnfg/test_factory_reset.robot b/mnfg/test_factory_reset.robot
index e0b5c6d..059375e 100644
--- a/mnfg/test_factory_reset.robot
+++ b/mnfg/test_factory_reset.robot
@@ -78,5 +78,5 @@
${data}= Create Dictionary data=@{EMPTY}
Run Keyword And Ignore Error OpenBMC Post Request
- ... ${SOFTWARE_VERSION_URI}/action/Reset data=${data}
+ ... ${SOFTWARE_VERSION_URI}action/Reset data=${data}
diff --git a/openpower/ras/test_host_ras.robot b/openpower/ras/test_host_ras.robot
index 085f980..1cd9447 100755
--- a/openpower/ras/test_host_ras.robot
+++ b/openpower/ras/test_host_ras.robot
@@ -413,7 +413,7 @@
Wait for OS
Verify And Clear Gard Records On HOST
Verify Error Log Entry ${signature_desc} ${log_prefix}
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
Should Not Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
Delete All BMC Dump
diff --git a/tests/ipmi/test_general_ipmi.robot b/tests/ipmi/test_general_ipmi.robot
index d570cf5..aeab7de 100755
--- a/tests/ipmi/test_general_ipmi.robot
+++ b/tests/ipmi/test_general_ipmi.robot
@@ -743,7 +743,7 @@
# value Integer value (eg. "0-Disabled", "1-Enabled").
${value_dict}= Create Dictionary data=${value}
- ${resp}= OpenBMC Put Request ${HOST_WATCHDOG_URI}/attr/Enabled
+ ${resp}= OpenBMC Put Request ${HOST_WATCHDOG_URI}attr/Enabled
... data=${value_dict}
diff --git a/tests/test_bmc_dump.robot b/tests/test_bmc_dump.robot
index 9478e2c..9686d9c 100644
--- a/tests/test_bmc_dump.robot
+++ b/tests/test_bmc_dump.robot
@@ -42,7 +42,7 @@
... systemctl restart xyz.openbmc_project.Dump.Manager.service
Sleep 10s reason=Wait for BMC dump service to restart properly.
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Check Existence of BMC Dump file ${dump_id}
@@ -54,7 +54,7 @@
Delete All BMC Dump
${dump_id}= Create User Initiated Dump
OBMC Reboot (off)
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Check Existence of BMC Dump file ${dump_id}
@@ -75,7 +75,7 @@
${dump_id}= Create User Initiated Dump
- ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}/${dump_id} Size
+ ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}${dump_id} Size
# Max size for dump is 200k = 200x1024
Should Be True 0 < ${dump_size} < 204800
Check Existence of BMC Dump file ${dump_id}
@@ -90,10 +90,10 @@
Delete BMC Dump ${dump_id_1}
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1}
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}${dump_id_1}
Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2}
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}${dump_id_2}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Check Existence of BMC Dump file ${dump_id_2}
@@ -116,7 +116,7 @@
Create User Initiated Dump
Delete All BMC Dump
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 00985a2..eff05c1 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -695,7 +695,7 @@
# item Inventory name (example: "fan/cpu/dimm/etc").
${count_inventory} Set Variable ${0}
- ${list}= Get Endpoint Paths ${HOST_INVENTORY_URI}/system/
+ ${list}= Get Endpoint Paths ${HOST_INVENTORY_URI}system/
... ${item}
: FOR ${element} IN @{list}
diff --git a/tests/test_software_manager.robot b/tests/test_software_manager.robot
index e13d9dd..9747bc9 100755
--- a/tests/test_software_manager.robot
+++ b/tests/test_software_manager.robot
@@ -21,7 +21,7 @@
... field.
[Tags] Verify_Software_Purpose
- ${object_uris}= Read Properties ${SOFTWARE_VERSION_URI}/list
+ ${object_uris}= Read Properties ${SOFTWARE_VERSION_URI}list
:FOR ${uri} IN @{object_uris}
\ ${object}= Read Properties ${uri}