Fix slashes in the test and lib codes
Change-Id: I18e30b45e0326bb4318a1468bbe3f9b66bbf0b29
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index ffed49f..3969ea7 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -234,8 +234,11 @@
# contain the value to set the property to at the 'data'
# key (e.g. data={"data": 1}).
+ # Make sure uri ends with slash.
+ ${uri}= Add Trailing Slash ${uri}
+
${base_uri}= Catenate SEPARATOR= ${DBUS_PREFIX} ${uri}
- ${resp}= Openbmc Put Request ${base_uri}/attr/${attr}
+ ${resp}= Openbmc Put Request ${base_uri}attr/${attr}
... timeout=${timeout} &{kwargs}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
diff --git a/lib/utils.robot b/lib/utils.robot
index b959f5e..51a6d03 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -223,7 +223,7 @@
# True or False.
${log_dict}= Create Dictionary data=${policy_setting}
- Write Attribute ${BMC_LOGGING_URI}${/}rest_api_logs Enabled
+ Write Attribute ${BMC_LOGGING_URI}rest_api_logs Enabled
... data=${log_dict} verify=${1} expected_value=${policy_setting}