Commit 5dc795d7 authored by Eisha Ayaz's avatar Eisha Ayaz
Browse files

[test-new][SOL025][TC-DATA-AN][v5.4.1][12.3.1.2.11...

[test-new][SOL025][TC-DATA-AN][v5.4.1][12.3.1.2.11 Test-ID][NFVSOL(26)000019r3​] Add testcase for error code 412
parent a6cbf3ec
Loading
Loading
Loading
Loading
+11 −0
Changes for SOL025/TelcoCloudDataAnalyticsService-API/DataAnalyticsOperationKeywords.robot: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -315,6 +315,17 @@ PATCH Individual Telco-Cloud data Analytics
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}

    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${body}=    Get File    jsons/telcoCloudAnalyticsModifications.json
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/analytics/${analyticsId}    ${body}	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}
Patch individual Telco-Cloud data analytics - Precondition Failed
    log    Trying to modify an individual Telco-Cloud data analytics
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    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/telcoCloudAnalyticsModifications.json
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/analytics/${analyticsId}    ${body}	
+12 −0
Changes for SOL025/TelcoCloudDataAnalyticsService-API/IndividualTelco-CloudDataAnalytics.robot: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -133,3 +133,15 @@ DELETE Individual Telco-Cloud data Analytics
    DELETE Individual Telco-Cloud data Analytics
    Check HTTP Response Status Code Is    204

PATCH Individual Telco-Cloud data Analytics - Precondition Failed
    [Documentation]    Test ID: 12.3.1.2.11
    ...    Test title: PATCH Individual Telco-Cloud data Analytics - Precondition Failed
    ...    Test objective: The objective is to test that the modification of the Individual Telco-Cloud data Analytics resource failed because precondition is not fulfilled.
    ...    Pre-conditions: The Individual Telco-Cloud Data Analytics resource exists. The If-Match header contains an ETag value that does not match the current ETag of the resource.
    ...    Reference: clause 5.5.4.3.4 - ETSI GS NFV-SOL 025 [12] v5.4.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    Patch individual Telco-Cloud data analytics - Precondition Failed
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is   ProblemDetails
+1 −0
Changes for SOL025/TelcoCloudDataAnalyticsService-API/environment/variables.txt: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ ${notExistingReportId} notExistingReportId
${analyticsId}      analyticsID
${reportId}      reportID
${original_etag}    some_etag
${etag}     etag

${CHECKS_NOTIF_ENDPOINT}    1   ## If true, during subscription, the FUT performs a get to the notification endpoint