Skip to content
Snippets Groups Projects
Commit 981db31e authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Created tests according to testplan for vendor extensibility

parent 7ab016c4
No related branches found
No related tags found
2 merge requests!99Merge Latest changes from staging to main,!75Ocf86 upgrade tests to allow vendorextensions
Pipeline #10247 passed
......@@ -14,7 +14,7 @@ ${API_INVOKER_NOT_REGISTERED} not-valid
*** Test Cases ***
Vendor Extensibility published with vendorExt active
Published API with vendor extensibility
[Tags] vendor_extensibility-1
${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info
${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info
......@@ -42,7 +42,7 @@ Vendor Extensibility published with vendorExt active
# Test
${resp}= Get Request Capif
... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}
... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported_features=2
... server=${CAPIF_HTTPS_URL}
... verify=ca.crt
... username=${INVOKER_USERNAME}
......@@ -55,8 +55,7 @@ Vendor Extensibility published with vendorExt active
Length Should Be ${resp.json()['serviceAPIDescriptions']} 1
List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published}
Vendor Extensibility published with vendorExt not active
Published API with vendor extensibility and discover with VendSpecQueryParams disabled
[Tags] vendor_extensibility-2
${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info
${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info
......@@ -72,12 +71,54 @@ Vendor Extensibility published with vendorExt not active
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=000
... supported_features=100
... vendor_specific_service_api_description=${vendor_specific_service_api_description}
... vendor_specific_aef_profile=${vendor_specific_aef_profile}
Dictionary Should Not Contain Key ${service_api_description_published} ${vendor_specific_service_api_key}
Dictionary Should Not Contain Key ${service_api_description_published['aefProfiles'][0]} ${vendor_specific_aef_profile_key}
Dictionary Should Contain Key ${service_api_description_published} ${vendor_specific_service_api_key}
Dictionary Should Contain Key ${service_api_description_published['aefProfiles'][0]} ${vendor_specific_aef_profile_key}
# Default Invoker Registration and Onboarding
${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding
# Test
${resp}= Get Request Capif
... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported_features=0
... server=${CAPIF_HTTPS_URL}
... verify=ca.crt
... username=${INVOKER_USERNAME}
Check Response Variable Type And Values
... ${resp}
... 404
... ProblemDetails
... title=Not Found
... status=404
... detail=API Invoker ${register_user_info_invoker['api_invoker_id']} has no API Published that accomplish filter conditions
... cause=No API Published accomplish filter conditions
Publish API with vendorExt active and discover without supported features filter
[Tags] vendor_extensibility-3
${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info
${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info
# Register APF
${register_user_info}= Provider Default Registration
# Create Vendor Specific information
${vendor_specific_service_api_description}= Create Vendor Specific Service Api Description
... ${vendor_specific_service_api_key}
${vendor_specific_aef_profile}= Create Vendor Specific Aef Profile
... ${vendor_specific_aef_profile_key}
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=100
... vendor_specific_service_api_description=${vendor_specific_service_api_description}
... vendor_specific_aef_profile=${vendor_specific_aef_profile}
Dictionary Should Contain Key ${service_api_description_published} ${vendor_specific_service_api_key}
Dictionary Should Contain Key ${service_api_description_published['aefProfiles'][0]} ${vendor_specific_aef_profile_key}
# Default Invoker Registration and Onboarding
${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding
......@@ -95,4 +136,163 @@ Vendor Extensibility published with vendorExt not active
Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions
Should Not Be Empty ${resp.json()['serviceAPIDescriptions']}
Length Should Be ${resp.json()['serviceAPIDescriptions']} 1
List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published}
\ No newline at end of file
Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions']} ${vendor_specific_service_api_key}
Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions']['aefProfiles'][0]} ${vendor_specific_aef_profile_key}
${service_api_description_published_to_check}= Copy Dictionary ${service_api_description_published} deepcopy=True
Remove From Dictionary ${service_api_description_published_to_check} ${vendor_specific_service_api_key}
Remove From Dictionary ${service_api_description_published_to_check['aefProfiles'][0]} ${vendor_specific_aef_profile_key}
List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published_to_check}
Publish API with vendorExt active but without vendorSpecifics
[Tags] vendor_extensibility-4
# Register APF
${register_user_info}= Provider Default Registration
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=100
Check Response Variable Type And Values
... ${resp}
... 400
... ProblemDetails
... title=Bad Request
... status=400
... detail=VendorExt feature active at Supported Features but VendorSpecifics parameters not published
... cause=VendorExt feature active but vendorSpecifics not present
Publish API with vendorExt inactive but with vendorSpecifics
[Tags] vendor_extensibility-5
${vendor_specific_service_api_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:service-info
${vendor_specific_aef_profile_key}= Set Variable vendorSpecific-urn:etsi:mec:capifext:transport-info
# Register APF
${register_user_info}= Provider Default Registration
# Create Vendor Specific information
${vendor_specific_service_api_description}= Create Vendor Specific Service Api Description
... ${vendor_specific_service_api_key}
${vendor_specific_aef_profile}= Create Vendor Specific Aef Profile
... ${vendor_specific_aef_profile_key}
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=0
... vendor_specific_service_api_description=${vendor_specific_service_api_description}
... vendor_specific_aef_profile=${vendor_specific_aef_profile}
Check Response Variable Type And Values
... ${resp}
... 400
... ProblemDetails
... title=Bad Request
... status=400
... detail=VendorExt feature inactive at Supported Features but VendorSpecifics are present parameters published
... cause=VendorExt feature inactive but vendorSpecifics present
Published API without vendor extensibility discover with VendSpecQueryParams enabled
[Tags] vendor_extensibility-6
# Register APF
${register_user_info}= Provider Default Registration
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=000
# Default Invoker Registration and Onboarding
${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding
# Test
${resp}= Get Request Capif
... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported_features=2
... server=${CAPIF_HTTPS_URL}
... verify=ca.crt
... username=${INVOKER_USERNAME}
Check Response Variable Type And Values
... ${resp}
... 404
... ProblemDetails
... title=Not Found
... status=404
... detail=API Invoker ${register_user_info_invoker['api_invoker_id']} has no API Published that accomplish filter conditions
... cause=No API Published accomplish filter conditions
Published API without vendor extensibility and discover with vendSpecQueryParams disabled
[Tags] vendor_extensibility-7
# Register APF
${register_user_info}= Provider Default Registration
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=00
# Default Invoker Registration and Onboarding
${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding
# Test
${resp}= Get Request Capif
... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}&supported_features=0
... server=${CAPIF_HTTPS_URL}
... verify=ca.crt
... username=${INVOKER_USERNAME}
Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs
# Check Results
Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions
Should Not Be Empty ${resp.json()['serviceAPIDescriptions']}
Length Should Be ${resp.json()['serviceAPIDescriptions']} 1
List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published}
Published API without vendor extensibility and discover without supported-features query parameter
[Tags] vendor_extensibility-8
# Register APF
${register_user_info}= Provider Default Registration
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=00
# Default Invoker Registration and Onboarding
${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding
# Test
${resp}= Get Request Capif
... ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}
... server=${CAPIF_HTTPS_URL}
... verify=ca.crt
... username=${INVOKER_USERNAME}
Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs
# Check Results
Dictionary Should Contain Key ${resp.json()} serviceAPIDescriptions
Should Not Be Empty ${resp.json()['serviceAPIDescriptions']}
Length Should Be ${resp.json()['serviceAPIDescriptions']} 1
List Should Contain Value ${resp.json()['serviceAPIDescriptions']} ${service_api_description_published}
Publish API without supportedFeatures
[Tags] vendor_extensibility-9
# Register APF
${register_user_info}= Provider Default Registration
# Publish one api
${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api
... ${register_user_info}
... supported_features=${NONE}
Check Response Variable Type And Values
... ${resp}
... 400
... ProblemDetails
... title=Bad Request
... status=400
... detail=supportedFeatures must be present in this request
... cause=supportedFeatures missed
......@@ -35,7 +35,6 @@ def create_service_api_description(api_name="service_1", aef_id="aef_id", suppor
}
],
"description": "ROBOT_TESTING",
"supportedFeatures": supported_features,
"shareableInfo": {
"isShareable": True,
"capifProvDoms": [
......@@ -60,5 +59,7 @@ def create_service_api_description(api_name="service_1", aef_id="aef_id", suppor
if isinstance(vendor_specific_aef_profile, dict):
for key, value in vendor_specific_aef_profile.items():
body["aefProfiles"][0][key] = value
if supported_features is not None:
body['supportedFeatures'] = supported_features
return body
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment