Commit d7e4b0f1 authored by M. Rehan Abbasi's avatar M. Rehan Abbasi
Browse files

update Content-Type header in PATCH requests or Individual PMJob and Threshold

parent 8f76d799
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -271,7 +271,7 @@ Send Put request for individual NFV-MANO Performance Job
Send Patch request for individual NFV-MANO Performance Job    
Send Patch request for individual NFV-MANO Performance Job    
    Log    Trying to perform a PATCH on PM Job
    Log    Trying to perform a PATCH on PM Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Check GET response from Notification Endpoint
    Check GET response from Notification Endpoint
    ${template}=    Get File    jsons/PmJobModifications.json
    ${template}=    Get File    jsons/PmJobModifications.json
@@ -283,7 +283,7 @@ Send Patch request for individual NFV-MANO Performance Job
Send Patch request for individual NFV-MANO Performance Job - Etag mismatch
Send Patch request for individual NFV-MANO Performance Job - Etag mismatch
    Log    Trying to perform a PATCH on PM Job
    Log    Trying to perform a PATCH on PM Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Set Headers    {"If-Match": "${invalid_etag}"}
    Set Headers    {"If-Match": "${invalid_etag}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Check GET response from Notification Endpoint
    Check GET response from Notification Endpoint
@@ -451,6 +451,7 @@ Send Put request for individual Performance Threshold
Send Patch request for individual Performance Threshold
Send Patch request for individual Performance Threshold
    Log    Trying to PUT threshold
    Log    Trying to PUT threshold
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Check GET response from Notification Endpoint
    Check GET response from Notification Endpoint
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
@@ -465,6 +466,7 @@ Send Patch request for individual Performance Threshold
Send Patch request for individual Performance Threshold - Etag mismatch
Send Patch request for individual Performance Threshold - Etag mismatch
    Log    Trying to PUT threshold
    Log    Trying to PUT threshold
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Set Headers    {"If-Match": "${invalid_etag}"}
    Set Headers    {"If-Match": "${invalid_etag}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Check GET response from Notification Endpoint
    Check GET response from Notification Endpoint
@@ -480,6 +482,7 @@ Send Patch request for individual Performance Threshold - Etag mismatch
Send Patch request for individual Performance Threshold with unprocessable entity
Send Patch request for individual Performance Threshold with unprocessable entity
    Log    Trying to PUT threshold
    Log    Trying to PUT threshold
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_PATCH}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    ${origOutput}=    Output    response
    ${origOutput}=    Output    response
+1 −0
Original line number Original line Diff line number Diff line
@@ -10,6 +10,7 @@ ${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken
${BAD_AUTHORIZATION_TOKEN}    Bear sometoken
${BAD_AUTHORIZATION_TOKEN}    Bear sometoken


${CONTENT_TYPE_JSON}    application/json
${CONTENT_TYPE_JSON}    application/json
${CONTENT_TYPE_PATCH}   application/merge-patch+json
${ACCEPT_JSON}    application/json
${ACCEPT_JSON}    application/json
${AUTH_USAGE}     1
${AUTH_USAGE}     1
${FIELD_USAGE}    1
${FIELD_USAGE}    1