diff --git a/MEC040/SRV/FederationEnablement.robot b/MEC040/SRV/FederationEnablement.robot index c897a257c18cf16ea64c55695826e12b9b25d0cb..d59c956efed24f475dbaee79f67763d8e9bace27 100644 --- a/MEC040/SRV/FederationEnablement.robot +++ b/MEC040/SRV/FederationEnablement.robot @@ -181,7 +181,172 @@ TP_MEC_MEC040_SRV_MEF_001_OK_11 Should Be True '${counterSystemName}'>'0' Should Be True '${counterSystemId}'>'0' +TP_MEC_MEC040_SRV_MEF_001_NF_01 + [Documentation] + ... Check that the IUT responds with an error + ... when selection is not applicable - SystemId + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve all system info resources with query params ${NOT_EXT_SYSTEM_ID_QUERY_PARAM} + Check HTTP Response Status Code Is 404 + +TP_MEC_MEC040_SRV_MEF_001_NF_02 + [Documentation] + ... Check that the IUT responds with an error + ... when selection is not applicable - SystemName + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve all system info resources with query params ${NOT_EXT_SYSTEM_NAME_QUERY_PARAM} + Check HTTP Response Status Code Is 404 + + +TP_MEC_MEC040_SRV_MEF_001_NF_03 + [Documentation] + ... Check that the IUT responds with an error + ... when selection is not applicable - SystemProvider + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve all system info resources with query params ${NOT_EXT_SYS_PROVIDER_QUERY_PARAM} + Check HTTP Response Status Code Is 404 + +##TODO double check +TP_MEC_MEC040_SRV_MEF_001_BR + [Documentation] + ... Check that the IUT responds with an error when request is malformed + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve all system info resources wrong URL + #Check HTTP Response Status Code Is 400 + +TP_MEC_MEC040_SRV_MEF_002_OK + [Documentation] + ... Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.4, clause 5.2.2.1.1 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Register System Info SystemInfo + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is SystemInfo + + +TP_MEC_MEC040_SRV_MEF_002_BR_01 + [Documentation] + ... Check that the IUT responds with an error on creating an existing systemInfo + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.4, clause 5.2.2.1.1 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Register System Info SystemInfoBR + Check HTTP Response Status Code Is 400 + + +##TODO double check +TP_MEC_MEC040_SRV_MEF_002_BR_02 + [Documentation] + ... Check that the IUT responds with an error on providing inconsistent data + ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.4, clause 5.2.2.1.1 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Register System Info SystemInfoBR + Check HTTP Response Status Code Is 400 + +TP_MEC_MEC040_SRV_MEF_003_OK + [Documentation] + ... Check that the IUT responds with a selection of all available systemInfo + ... when requested by a MEC Orchestrator + ... ETSI GS MEC 040 V3.1.1, clause 7.4.3.1, clause 5.2.2.1.1 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve specific system info resource ${EXPECTED_SYSTEM_ID} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is SystemInfo + +TP_MEC_MEC040_SRV_MEF_003_NF + [Documentation] + ... Check that the IUT responds with an error + ... when it receives a request for returning a systemInfo referred with a wrong systemId + ... ETSI GS MEC 040 V3.1.1, clause 7.4.3.1, clause 5.2.2.1.1 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve specific system info resource ${NOT_EXISTING_SYSTEM_ID} + Check HTTP Response Status Code Is 404 + +##TODO double check +TP_MEC_MEC040_SRV_MEF_003_BR + [Documentation] + ... Check that the IUT responds with an error + ... when it receives a request for returning a systemInfo referred with a wrong systemId + ... ETSI GS MEC 040 V3.1.1, clause 7.4.3.1, clause 5.2.2.1.1 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Retrieve specific system info resource ${NOT_EXISTING_SYSTEM_ID} + #Check HTTP Response Status Code Is 400 + +TP_MEC_MEC040_SRV_MEF_004_OK_01 + [Documentation] + ... Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdate + Check HTTP Response Status Code Is 200 + Should Be Equal As Strings ${response['body']['systemProvider']} ${EXPECTED_NEW_SYSTEM_PROVIDER} + +TP_MEC_MEC040_SRV_MEF_004_OK_02 + [Documentation] + ... Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdate2 + Check HTTP Response Status Code Is 200 + Should Be Equal As Strings ${response['body']['systemName']} ${EXPECTED_NEW_SYSTEM_NAME} + +TP_MEC_MEC040_SRV_MEF_004_OK_02 + [Documentation] + ... Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdate3 + Check HTTP Response Status Code Is 200 + Should Be Equal As Strings ${response['body']['systemName']} ${EXPECTED_NEW_SYSTEM_NAME} + Should Be Equal As Strings ${response['body']['systemProvider']} ${EXPECTED_NEW_SYSTEM_PROVIDER} + +TP_MEC_MEC040_SRV_MEF_004_NF + [Documentation] + ... Check that the IUT responds with an error when requested to update an unknown systemInfo + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Update specific system info resource ${NOT_EXISTING_SYSTEM_ID} SystemInfoUpdate3 + Check HTTP Response Status Code Is 404 + +##TODO double check the corresponding TP +#TP_MEC_MEC040_SRV_MEF_004_BR_01 + #[Documentation] + #... Check that the IUT responds with an error when requested to update with an inconsistant URI + #... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 + #... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + #Update specific system info resource ${NOT_EXISTING_SYSTEM_ID} SystemInfoUpdate3 + #Check HTTP Response Status Code Is 400 + +TP_MEC_MEC040_SRV_MEF_004_BR_02 + [Documentation] + ... Check that the IUT responds with an error when requested to update with no data provided + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdateBR + Check HTTP Response Status Code Is 400 + +TP_MEC_MEC040_SRV_MEF_005_OK + [Documentation] + ... Check that the IUT responds with an error when requested to delete an unknown systemInfo + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.5, clause 5.2.2.1.3 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Remove specific system info resource ${EXPECTED_SYSTEM_ID} + Check HTTP Response Status Code Is 204 + +TP_MEC_MEC040_SRV_MEF_005_NF + [Documentation] + ... Check that the IUT responds with an error when requested to delete an unknown systemInfo + ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.5, clause 5.2.2.1.3 + ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + Remove specific system info resource ${NOT_EXISTING_SYSTEM_ID} + Check HTTP Response Status Code Is 404 ############################################################################ + + + *** Keywords *** Retrieve all system info resources @@ -194,7 +359,6 @@ Retrieve all system info resources ${output}= Output response Set Suite Variable ${response} ${output} - Retrieve all system info resources with query params [Arguments] ${query_params} Should Be True ${PIC_MEC_PLAT} == 1 @@ -204,4 +368,64 @@ Retrieve all system info resources with query params Set Headers {"Authorization":"${TOKEN}"} GET ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info?${query_params} ${output}= Output response - Set Suite Variable ${response} ${output} \ No newline at end of file + Set Suite Variable ${response} ${output} + + Retrieve specific system info resource + [Arguments] ${SYSTEM_INFO_ID} + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + GET ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info/${SYSTEM_INFO_ID} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Register System Info + [Arguments] ${content} + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Update specific system info resource + [Arguments] ${systemId} ${content} + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + PATCH ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info/${systemId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Remove specific system info resource + [Arguments] ${systemId} + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info/${systemId} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Retrieve all system info resources wrong URL + Should Be True ${PIC_MEC_PLAT} == 1 + Should Be True ${PIC_SERVICES} == 1 + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + GET ${apiRoot}/${apiName}/v10/fed_resources/system_info + ${output}= Output response + Set Suite Variable ${response} ${output} + \ No newline at end of file diff --git a/MEC040/SRV/environment/variables.txt b/MEC040/SRV/environment/variables.txt index 8c8cc9e6ee3c3e34b10e263653341bae9dccff71..f445ea346f853c2d302b8547c722723833956cfe 100644 --- a/MEC040/SRV/environment/variables.txt +++ b/MEC040/SRV/environment/variables.txt @@ -10,24 +10,30 @@ ${apiName} fed-enablement ${apiVersion} v1 ${EXPECTED_SYSTEM_ID} SYSTEM_ID +${NOT_EXISTING_SYSTEM_ID} NOT_EXISTING_SYS_ID ${EXPECTED_SYSTEM_ID2} SYSTEM_ID2 ${SYSTEM_ID_QUERY_PARAM} systemId=${EXPECTED_SYSTEM_ID} +${NOT_EXT_SYSTEM_ID_QUERY_PARAM} systemId=${NOT_EXISTING_SYSTEM_ID} ${MULTIPLE_SYSTEM_ID_QUERY_PARAM} systemId=${EXPECTED_SYSTEM_ID},${EXPECTED_SYSTEM_ID2} ${EMPTY_SYSTEM_ID_QUERY_PARAM} systemId= ${EXPECTED_SYSTEM_NAME} SYSTEM_NAME ${EXPECTED_SYSTEM_NAME2} SYSTEM_NAME2 +${NOT_EXISTING_SYS_NAME} NOT_EXISTING_SYS_NAME ${SYSTEM_NAME_QUERY_PARAM} systemName=${EXPECTED_SYSTEM_NAME} +${NOT_EXT_SYSTEM_NAME_QUERY_PARAM} systemName=${NOT_EXISTING_SYS_NAME} ${MUTIPLE_SYSTEM_NAME_QUERY_PARAM} systemName=${EXPECTED_SYSTEM_NAME},${EXPECTED_SYSTEM_NAME2} ${EMPTY_SYSTEM_NAME_QUERY_PARAM} systemName= ${EXPECTED_SYSTEM_PROVIDER} SYSTEM_PROVIDER ${EXPECTED_SYSTEM_PROVIDER2} SYSTEM_PROVIDER2 +${NOT_EXT_SYS_PROVIDER} NOT_EXISTING_SYS_PROVIDER ${SYSTEM_PROVIDER_QUERY_PARAM} systemProvider=${EXPECTED_SYSTEM_PROVIDER} +${NOT_EXT_SYS_PROVIDER_QUERY_PARAM} systemProvider=${NOT_EXT_SYS_PROVIDER} ${MUTIPLE_SYS_PROVIDER_QUERY_PAR} systemProvider=${EXPECTED_SYSTEM_PROVIDER},${EXPECTED_SYSTEM_PROVIDER2} ${EMPTY_SYSTEM_PROVIDER_QUERY_PARAM} systemProvider= ${FILTER_ON_SYSTEM_ID_AND_NAME} systemId=${EXPECTED_SYSTEM_ID},systemName=${EXPECTED_SYSTEM_NAME} - - +${EXPECTED_NEW_SYSTEM_PROVIDER} SYSTEM_NEW_ENDPOINT_1 +${EXPECTED_NEW_SYSTEM_NAME} SYSTEM_NEW_NAME_1 diff --git a/MEC040/SRV/jsons/SystemInfo.json b/MEC040/SRV/jsons/SystemInfo.json index ce8b0d4293621795768f45aa3133253099987d81..6abc01c25491241b1a7e8c91e9d6a577362c0bb7 100644 --- a/MEC040/SRV/jsons/SystemInfo.json +++ b/MEC040/SRV/jsons/SystemInfo.json @@ -1,5 +1,4 @@ { - "systemId": "systemId", "systemName": "systemNamea", "systemProvider": "systemProvider" } \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfoBR.json b/MEC040/SRV/jsons/SystemInfoBR.json new file mode 100644 index 0000000000000000000000000000000000000000..fff9ecc25cf72427189ed88e2f15b764bbe4c5ce --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfoBR.json @@ -0,0 +1,5 @@ +{ + "systemId":"SYSTEM_ID", + "systemName": "systemNamea", + "systemProvider": "systemProvider" +} \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfoUpdate.json b/MEC040/SRV/jsons/SystemInfoUpdate.json new file mode 100644 index 0000000000000000000000000000000000000000..20ba86630047947e008113a2a1f720ee21072daf --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfoUpdate.json @@ -0,0 +1,3 @@ +{ + "endpoint": "SYSTEM_NEW_ENDPOINT_1" +} \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfoUpdate2.json b/MEC040/SRV/jsons/SystemInfoUpdate2.json new file mode 100644 index 0000000000000000000000000000000000000000..5ce2c24c562cc7b71dbf6988dc89a9ff34f36fbc --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfoUpdate2.json @@ -0,0 +1,3 @@ +{ + "systemName": "SYSTEM_NEW_NAME_1" +} \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfoUpdate3.json b/MEC040/SRV/jsons/SystemInfoUpdate3.json new file mode 100644 index 0000000000000000000000000000000000000000..d9866933db557716f12c135ce08b689d805569e2 --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfoUpdate3.json @@ -0,0 +1,4 @@ +{ + "endpoint": "SYSTEM_NEW_ENDPOINT_1", + "systemName": "SYSTEM_NEW_NAME_1" +} \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfoUpdateBR.json b/MEC040/SRV/jsons/SystemInfoUpdateBR.json new file mode 100644 index 0000000000000000000000000000000000000000..7a73a41bfdf76d6f793007240d80983a52f15f97 --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfoUpdateBR.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file