Fixes [INT-152] serviceUri attribute in test 7.3.2.s1 00/13900/3
authorAlberto Losada <alosadag@redhat.com>
Wed, 18 Dec 2024 14:20:45 +0000 (15:20 +0100)
committerAlberto Losada <alosadag@redhat.com>
Mon, 30 Dec 2024 11:33:06 +0000 (12:33 +0100)
It always expects the port number included even if it is a wellknown port

Issue-ID: INT-152

Change-Id: I3c9f43b045176781674c88f22931278d5d72e6ef
Signed-off-by: Alberto Losada <alosadag@redhat.com>
test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.2_SMO_succeeds_to_query_inventory_with_O2ims_APIs_and_correct_token.robot

index 7f2336b..b585b16 100644 (file)
@@ -14,6 +14,7 @@ ${SMO_TOKEN_DATA}           ${ocloud.oran_o2_app.smo_token_data}
 ${globalLocationId}         ${ocloud.oran_o2_app.g_location_id}
 
 ${ORAN_O2IMS_ENDPOINT}  ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:${ORAN_SERVICE_NODE_PORT}
+${ORAN_O2IMS_ENDPOINT_DEFAULT_PORT}  ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}
 
 *** Test Cases ***
 s1, query o-cloud detail
@@ -32,7 +33,12 @@ s1, query o-cloud detail
     Integer  response status    200
     # Object   response body
     String   $.globalcloudId    ${GLOBAL_OCLOUD_ID1}
-    String   $.serviceUri       ${ORAN_O2IMS_ENDPOINT}
+    # Sometimes serviceUri might not contain the port number in the json response if it is a well-known port.
+    IF      ${ORAN_SERVICE_NODE_PORT} == 443 or ${ORAN_SERVICE_NODE_PORT} == 80
+        String   $.serviceUri    ${ORAN_O2IMS_ENDPOINT}  ${ORAN_O2IMS_ENDPOINT_DEFAULT_PORT}
+    ELSE
+        String   $.serviceUri    ${ORAN_O2IMS_ENDPOINT}
+    END
 
     # all_fields
     Expect Response Body        ${CURDIR}/schemas/ocloud_allfields_properties.json