Skip to content
Snippets Groups Projects
Commit 7eb832d8 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

updated tests on 412 for SOL003 VNFFM

parent 5dcbc038
No related branches found
No related tags found
2 merge requests!228Merge 2.8.1 dev into Master",!226Merve 2.8.1 dev into Master
......@@ -10,9 +10,6 @@ Library MockServerLibrary
Library Process
*** Variables ***
${original_etag} 1234
*** Keywords ***
Create Sessions
Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance
......@@ -209,8 +206,6 @@ GET Fault Management Individual Alarm
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Execute Query and validate response
Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}
${etag} Output response headers ETag
Set Suite Variable &{original_etag} ${etag}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
......@@ -234,11 +229,11 @@ PATCH Fault Management Individual Alarm
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Fault Management Individual Alarm - precondition failed
PATCH Fault Management Individual Alarm - Etag mismatch
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${original_etag[0]}"}
Set Headers {"If-Match": "${invalid_etag}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body}
......@@ -249,7 +244,6 @@ PATCH Fault Management Individual Alarm Conflict
log Trying to perform a PATCH. This method modifies an individual alarm resource
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"}
Set Headers {"If-Match": "${Etag}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/alarmModifications.json
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body}
......
......@@ -55,7 +55,6 @@ PATCH Fault Management Individual Alarm
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Check Precondition VNF fault management individual alarm Exists
PATCH Fault Management Individual Alarm
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is alarmModification
......@@ -63,30 +62,27 @@ PATCH Fault Management Individual Alarm
Modify an individual alarm resource - Precondition failed
[Documentation] Test ID: 7.3.5.2.5
... Test title: Modify an individual alarm resource - Precondition failed
... Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set
... Test objective: The objective is to test that an individual alarm resource cannot be modified if the resource was modified by another entity
... Pre-conditions: The related alarm exists
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Check Precondition VNF fault management individual alarm Exists
PATCH Fault Management Individual Alarm - precondition failed
Check HTTP Response Status Code Is 409
PATCH Fault Management Individual Alarm - Etag mismatch
Check HTTP Response Status Code Is 412
Check HTTP Response Body Json Schema Is ProblemDetails
Modify an individual alarm resource - Conflict
[Documentation] Test ID: 7.3.5.2.6
... Test title: Modify an individual alarm resource - Conflict
... Test objective: The objective is to test that an individual alarm resource cannot be modified if the resource was modified by another entity
... Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set
... Pre-conditions: The related alarm exists
... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.8.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Depends On Test PATCH Fault Management Individual Alarm
Check Precondition VNF fault management individual alarm Exists
PATCH Fault Management Individual Alarm Conflict
Check HTTP Response Status Code Is 412
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
DELETE Alarm - Method not implemented
......
......@@ -16,8 +16,7 @@ ${invalid_alarm_filter} badFilter
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${CONTENT_TYPE_PATCH} application/merge-patch+json
${Etag}= an etag
${Etag_modified}= a modified etag
${invalid_etag}= invalid etag
${VNFM_DUPLICATION} 1
${sub_filter} filter
......
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