Commit 377bb007 authored by Eisha Ayaz's avatar Eisha Ayaz
Browse files

[test-upd][SOL003][VIRT-RES-QUOTA][v5.4.1][7.3.7.5.x...

[test-upd][SOL003][VIRT-RES-QUOTA][v5.4.1][7.3.7.5.x Test-IDs][NFVIFA(26)000116] Add support for verification of authentication header in VIRT-RES-QUOTA notification messages as per issue#33 in NFVIFA(26)000116
parent 5c8e6615
Loading
Loading
Loading
Loading
+8 −0
Changes for SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -48,14 +48,22 @@ Configure Virtual Quota Available Notification Handler
    ${BODY}=    evaluate    json.dumps(${json})    json
    Log  Creating mock request and response to handle status notification
    &{req}=  Create Mock Request Matcher	POST  ${endpoint}  body_type="JSON"    body=${BODY}
    &{req}=  Update Mock Request Matcher With Headers  ${req}    ${AUTHORIZATION_HEADER}     ${AUTHORIZATION_TOKEN_NOTIF}
    Set Global Variable    ${notification_request}    ${req}
    &{notification_response}=  Create Mock Response    status_code=204
    Create Mock Expectation  ${notification_request}  ${notification_response}
    
Update Mock Request Matcher With Headers
    [Arguments]    ${matcher}    ${headerType}    ${headerValue}
    ${hdr}=     Create Dictionary    name=${headerType}    values=${{ [${headerValue}] }}
    Set To Dictionary    ${matcher}    headers=${{ [$hdr] }}
    RETURN    ${matcher}

Configure Notification Forward
    [Arguments]    ${schema}    ${endpoint}    ${endpoint_fwd}    
    Log  Creating mock Http POST forward to handle ${schema}
    &{notification_tmp}=  Create Mock Request Matcher	POST  ${endpoint}  body_type="JSON_SCHEMA"    body=${schema}
    &{notification_tmp}=  Update Mock Request Matcher With Headers  ${notification_tmp}    ${AUTHORIZATION_HEADER}     ${AUTHORIZATION_TOKEN_NOTIF}
    &{notification_fwd}=  Create Mock Http Forward	${endpoint_fwd}
    Create Mock Expectation With Http Forward  ${notification_tmp}  ${notification_fwd}

+1 −0
Changes for SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ ${NFVO_SCHEMA} https
${OAUTH_ENCRYPTION_ALGORITHM}  HS256
${OAUTH_KEY}
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN_NOTIF}    Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ98927
${AUTHORIZATION_TOKEN}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

${VRQAN_PERMITTED_SCOPE}  vrqan:v1:all