Fix for replace CA certificate test
With multiple CA certificate upload support, there is a need
to replace CA certificate with correct id. This fix is for
the same.
Change-Id: Icb9d041ed918aa21d7a54d32387ff4ce67d18da1
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/redfish/managers/test_certificate.robot b/redfish/managers/test_certificate.robot
index dc2ac64..f79535d 100644
--- a/redfish/managers/test_certificate.robot
+++ b/redfish/managers/test_certificate.robot
@@ -203,6 +203,7 @@
... ${certificate_uri}/${cert_id} CertificateString
Run Keyword If '${expected_status}' == 'ok' Should Contain ${cert_file_content} ${bmc_cert_content}
+ [Return] ${cert_id}
Install Certificate File On BMC
@@ -248,7 +249,7 @@
# request (i.e. "ok" or "error").
# Install certificate before replacing client or CA certificate.
- Run Keyword If '${cert_type}' == 'Client'
+ ${cert_id}= Run Keyword If '${cert_type}' == 'Client'
... Install And Verify Certificate Via Redfish ${cert_type} Valid Certificate Valid Privatekey ok
... ELSE IF '${cert_type}' == 'CA'
... Install And Verify Certificate Via Redfish ${cert_type} Valid Certificate ok
@@ -264,7 +265,7 @@
${certificate_uri}= Set Variable If
... '${cert_type}' == 'Server' ${REDFISH_HTTPS_CERTIFICATE_URI}/1
... '${cert_type}' == 'Client' ${REDFISH_LDAP_CERTIFICATE_URI}/1
- ... '${cert_type}' == 'CA' ${REDFISH_CA_CERTIFICATE_URI}/1
+ ... '${cert_type}' == 'CA' ${REDFISH_CA_CERTIFICATE_URI}/${cert_id}
${certificate_dict}= Create Dictionary @odata.id=${certificate_uri}
${payload}= Create Dictionary CertificateString=${file_data}