Commits (65)
...@@ -9,7 +9,24 @@ cd "$(dirname "$0")" ...@@ -9,7 +9,24 @@ cd "$(dirname "$0")"
run_dir="$(pwd)" run_dir="$(pwd)"
echo "Using git branch $GIT_BRANCH"
./scripts/build-container.sh ./scripts/build-container.sh
./scripts/run-container.sh "${run_dir}" ./scripts/run-container.sh "${run_dir}"
exit $? if [[ "$GIT_BRANCH" =~ .*fix-plu$ ]]; then
apiTestsVersion=$(echo $GIT_BRANCH | cut -d'/' -f 2)
apiTestsVersion=$(echo $apiTestsVersion | cut -d'-' -f 1)
echo apiTestsVersion
curl -X POST \
-F token=${ROBOT_HIVE_TAP_TT_TOKEN} \
-F ref=master \
-F "variables[API_TESTS_VERSION]=$apiTestsVersion" \
-F "variables[TEST_SUITE]=MEC" \
https://forge.etsi.org/rep/api/v4/projects/484/trigger/pipeline
fi
ret=$?
echo "Final validation result: $ret"
exit $ret
...@@ -25,7 +25,8 @@ Should Be Present In Json List ...@@ -25,7 +25,8 @@ Should Be Present In Json List
[Arguments] ${expr} ${json_field} ${json_value} [Arguments] ${expr} ${json_field} ${json_value}
Log Check if ${json_field} is present in ${expr} with the value ${json_value} Log Check if ${json_field} is present in ${expr} with the value ${json_value}
:FOR ${item} IN @{expr} :FOR ${item} IN @{expr}
\ Exit For Loop If ${item[${json_field}]} == ${json_value} \ ${are_equal}= Should Be Equal As Strings ${item["${json_field}"]} ${json_value}
\ Exit For Loop If ${are_equal}
Log Item found ${item} Log Item found ${item}
[return] ${item} [return] ${item}
......
''[Documentation] robot --outputdir ./outputs ./SRV/UETAG/PlatUeIdentity.robot ''[Documentation] robot --outputdir ./outputs ./Grant.robot
... Test Suite to validate UE Identity Tag (UETAG) operations. ... Test Suite to validate Grant operations.
*** Settings *** *** Settings ***
Resource environment/variables.txt Resource environment/variables.txt
Resource ../../GenericKeywords.robot Resource ../../../GenericKeywords.robot
Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false
Library OperatingSystem Library OperatingSystem
*** Test Cases *** *** Test Cases ***
Request a new Grant - Synchronous mode TC_MEC_MEC010p2_MEO_GRANT_001_OK
[Documentation] TP_MEC_MEO_GRANT_001_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_001_OK
... Check that MEO sends a synchronous grant response when a grant request is requested ... Check that MEO sends a synchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1 ... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1 (GrantRequest) ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 (Grant) ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequest Create a GRANT request grantRequest
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is Grant Check HTTP Response Body Json Schema Is Grant
TC_MEC_MEC010p2_MEO_GRANT_001_BR
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_001_BR
Request a new Grant - Malformed request
[Documentation] TP_MEC_MEO_GRANT_001_BR
... Check that MEO responds with an error when it receives a malformed request when a new grant request is performed ... Check that MEO responds with an error when it receives a malformed request when a new grant request is performed
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2 ... ETSI GS MEC 010-2 2.2.1, clause 7.6.1.3.2
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 (Grant) ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRejectedRequest Create a GRANT request grantBadRequest
Check HTTP Response Status Code Is 400 Check HTTP Response Status Code Is 400
TC_MEC_MEC010p2_MEO_GRANT_002_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_002_OK
... Check that MEO sends a synchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 //GrantRequest
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequest2
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is Grant
Request a new Grant - Asynchronous mode TC_MEC_MEC010p2_MEO_GRANT_003_OK
[Documentation] TP_MEC_MEO_GRANT_002_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_003_OK
... Check that MEO sends a asynchronous grant response when a grant request is requested ... Check that MEO sends an asynchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1 ... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 (Grant) ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequest Create a GRANT request grantRequestAsynchronous
Check HTTP Response Status Code Is 202 Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location Check HTTP Response Header Contains Location
Check HTTP Response Body is Empty
Request an individual grant - Ongoing process
[Documentation] TP_MEC_MEO_GRANT_003_OK TC_MEC_MEC010p2_MEO_GRANT_004_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_004_OK
... Check that MEO sends an asynchronous grant response when a grant request is requested
... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest)
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant)
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Create a GRANT request grantRequestAsynchronous2
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
TC_MEC_MEC010p2_MEO_GRANT_005_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_005_OK
... Check that MEO sends the status of a grant request when a query on a granting ID is performed. ... Check that MEO sends the status of a grant request when a query on a granting ID is performed.
... The process of creating the grant is ongoing, no grant is available yet ... The process of creating the grant is ongoing, no grant is available yet
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2 ... ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${grantId} Get an individual grant ${GRANT_ID_ACCEPTED}
Check HTTP Response Status Code Is 202 Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location Check HTTP Response Header Contains Location
Check HTTP Response Body is Empty
TC_MEC_MEC010p2_MEO_GRANT_006_OK
[Documentation] TP_MEC_MEC010p2_MEO_GRANT_006_OK
... Check that MEO sends the status of a grant request when a query on a granting ID is performed.
... The process of creating the grant is ongoing, no grant is available yet
... ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2
... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${GRANT_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is Grant
Request an individual grant using non existant grant identifier TC_MEC_MEC010p2_MEO_GRANT_006_NF
[Documentation] TP_MEC_MEO_GRANT_003_NF [Documentation] TP_MEC_MEC010p2_MEO_GRANT_006_NF
... Check that MEO responds with an error when it receives a request for returning a grant referred with a wrong ID ... Check that MEO responds with an error when it receives
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2 ... a request for returning a grant referred with a wrong ID
... ETSI GS MEC 010-2 2.1.1, clause 7.5.2.3.2
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${non_existant_grant_id} Get an individual grant ${NOT_EXISTING_GRANT_ID}
Check HTTP Response Status Code Is 404 Check HTTP Response Status Code Is 404
Request an individual grant - Successful
[Documentation] TP_MEC_MEO_GRANT_004_OK
... Check that MEO sends the status of a grant request when a query on a granting ID is performed
... ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2
... ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1
[Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS
Get an individual grant ${grantId}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is Grant
*** Keywords *** *** Keywords ***
Create a GRANT request Create a GRANT request
...@@ -99,7 +121,7 @@ Create a GRANT request ...@@ -99,7 +121,7 @@ Create a GRANT request
Get an individual grant Get an individual grant
[Arguments] ${grantId} [Arguments] ${grantId}
Set Headers {"Accept":"application/json"} Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"} Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"} Set Headers {"Authorization":"${TOKEN}"}
Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} allow_redirects=false Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} allow_redirects=false
${output}= Output response ${output}= Output response
......
*** Variables *** *** Variables ***
# Generic variables # Generic variables
${MEO_SCHEMA} http ${MEO_SCHEMA} http
${MEO_HOST} 10.192.2.172 #${MEO_HOST} 10.192.2.172
${MEO_HOST} 127.0.0.1
${MEO_PORT} 8081 ${MEO_PORT} 8081
${response} {} ${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
...@@ -10,8 +11,10 @@ ${apiName} granting ...@@ -10,8 +11,10 @@ ${apiName} granting
${apiVersion} v1 ${apiVersion} v1
# Specific variables # Specific variables
${grantId} e0deee2b-6e50-4f33-ab09-8bf0585025d3 ${GRANT_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${non_existant_grant_id} non_existant_grant_id ${GRANT_ID_ACCEPTED} abcdee2b-6e50-4f33-ab09-8bf05850abcd
${NOT_EXISTING_GRANT_ID} NOT_EXISTING_GRANT_ID
${APP_INSTANCE_ID} 456
# Notifications variables # Notifications variables
......
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operationERROR":"INSTANTIATE"
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operationERROR":"INSTANTIATE"
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"appDId":"appDId",
"operation":"INSTANTIATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "OPERATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "456",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "INSTANTIATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "456",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "OPERATE",
"addResources": [
{
"resourceDefinitionId": "resourceDefinitionId",
"vimConnectionId": "vimConnectionId",
"resourceGroupId": "resourceGroupId",
"zoneId": "zoneId"
}
],
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
{
"id": "123",
"appInstanceId": "456",
"appLcmOpOccId": "789",
"operation": "INSTANTIATE",
"_links": {
"appLcmOpOcc": {
"href": "https://anexample.ex/"
},
"appInstance": {
"href": "https://anexample.ex/"
}
}
}
\ No newline at end of file
This diff is collapsed.
*** Variables *** *** Variables ***
# Generic variables # Generic variables
${MEO_SCHEMA} http ${MEO_SCHEMA} http
${MEO_HOST} 10.192.2.172 ${MEO_HOST} 127.0.0.1
#${MEO_HOST} 10.192.2.172
${MEO_PORT} 8081 ${MEO_PORT} 8081
${response} {} ${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot} ${apiRoot}
${apiName} apmi ${apiName} app_pkgm
${apiVersion} v1 ${apiVersion} v1
# Specific variables # Specific variables
${APP_PKG_NAME} APP_PKG_NAME // Should be the same as in AppPkg.json ${APP_PKG_NAME} appName
${APP_PKG_VERSION} APP_PKG_VERSION // Should be the same as in AppPkg.json ${APP_PKG_VERSION} APP_PKG_VERSION
${CHECKSUM} CHECKSUM // Should be the same as in AppPkg.json ${APP_NAME} appName
${OPERATIONAL_STATE} OPERATIONAL_STATE // Should be the same as in AppPkg.json ${CHECKSUM} SHA-256
${USAGE_STATE} USAGE_STATE // Should be the same as in AppPkg.json ${OPERATIONAL_STATE} ENABLED
${ONBOARDING_STATE} CREATED
${USAGE_STATE} NOT_IN_USE
${APP_PKG_ID} 01234782-2c70-4e47-9a4e-0ee3a1a00123
${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f ${ON_BOARDED_APP_PKG_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f
${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 ${APPD_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${MALFORMED_FILTER_NAME} operationalStatus // Should be operationalState ${MALFORMED_FILTER_NAME} operationalStatus
${FILTER_VALUE} NOT_IN_USE ${FILTER_VALUE} NOT_IN_USE
${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID ${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID
${NON_EXISTING_APPD_ID} NON_EXISTENT_APPD_ID
${OPERATION_VALUE} DISABLE ${OPERATION_VALUE} DISABLE
${WRONG_OPERATION_VALUE} DISABL
${ACCEPTED_CONTENT_TYPE} text/plain // Should refer to the type of AppD ${ACCEPTED_CONTENT_TYPE} text/plain; charset=utf-8
${ACCEPTED_CONTENT_TYPE_ZIP} application/zip
${WRONG_CONTENT_TYPE} application/json
${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3
${NOT_EXISTING_APP_PKG_ID} NOT_EXISTING_APP_PKG_ID
${SUBSCRIPTION_TYPE} AppPackageOnBoardingSubscription
${SUBSCRIPTION_TYPE} MobilityProcedureSubscription
${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID
${CALLBACK_URI} http://some.url/somepath
# Notifications variables # Notifications variables
......
{
"operationalState": "ENABLED"
}
\ No newline at end of file
{
"operationalState": "DISABL"
}
\ No newline at end of file
{
"id": "1234",
"subscriptionType": "AppPackageOnBoardingSubscription",
"callbackUri": "http://172.22.1.7:9091",
"_links": {
"self": {
"href": "https://app_lcm/subscriptions/1234"
}
}
}
\ No newline at end of file
{
"id": "1234",
"subscriptionType": "ON-BOARDING",
"callbackUri": "http://172.22.1.7:9091",
"_links": {
"self": {
"href": "https://app_lcm/subscriptions/1234"
}
}
}
\ No newline at end of file