Commit a0689c52 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

final update on use and config of auth header

parent 7405efa8
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -203,7 +203,7 @@ Get all VNF indicators with malformed authorization token
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Log    The GET method queries multiple VNF indicators using invalid token
    Log    The GET method queries multiple VNF indicators using invalid token
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Authorization": "${BAD_AUTHORIZATION}"}
    Set Headers    {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    ${output}=    Output    response
    ${output}=    Output    response
@@ -213,7 +213,7 @@ Get all VNF indicators with expired or revoked authorization token
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Log    The GET method queries multiple VNF indicators using invalid token
    Log    The GET method queries multiple VNF indicators using invalid token
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Authorization": "${NEG_AUTHORIZATION}"}
    Set Headers    {"${AUTHORIZATION_HEADER}":"${NEG_AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    ${output}=    Output    response
    ${output}=    Output    response
+2 −2
Original line number Original line Diff line number Diff line
@@ -4,8 +4,8 @@ ${PRODUCER_PORT} 8081
${PRODUCER_SCHEMA}    https
${PRODUCER_SCHEMA}    https
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ=
${AUTHORIZATION_TOKEN}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ=
${NEG_AUTHORIZATION}    Bearer negativetoken
${NEG_AUTHORIZATION_TOKEN}    Bearer negativetoken
${BAD_AUTHORIZATION}    Bear sometoken
${BAD_AUTHORIZATION_TOKEN}    Bear sometoken
${CONTENT_TYPE_JSON}    application/json
${CONTENT_TYPE_JSON}    application/json
${EM-VNF_HOST}    localhost
${EM-VNF_HOST}    localhost
${EM-VNF_PORT}    8002
${EM-VNF_PORT}    8002
+1 −1
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@ ${apiName} vnfpm


${CONTENT_TYPE_JSON}    application/json
${CONTENT_TYPE_JSON}    application/json
${ACCEPT_JSON}    application/json
${ACCEPT_JSON}    application/json
${NEG_AUTHORIZATION}    Bearer negativetoken
${NEG_AUTHORIZATION_TOKEN}    Bearer negativetoken
${FIELD_USAGE}    1
${FIELD_USAGE}    1
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ
${AUTHORIZATION_TOKEN}    Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ
+2 −2
Original line number Original line Diff line number Diff line
@@ -257,7 +257,7 @@ Get all VNF indicators with malformed authorization token
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Log    The GET method queries multiple VNF indicators using invalid token
    Log    The GET method queries multiple VNF indicators using invalid token
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Authorization": "${BAD_AUTHORIZATION}"}
    Set Headers    {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    ${output}=    Output    response
    ${output}=    Output    response
@@ -267,7 +267,7 @@ Get all VNF indicators with expired or revoked authorization token
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Pass Execution If    ${AUTH_USAGE} == 0    Skipping test as EM/VNF is not supporting authentication
    Log    The GET method queries multiple VNF indicators using invalid token
    Log    The GET method queries multiple VNF indicators using invalid token
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Authorization": "${NEG_AUTHORIZATION}"}
    Set Headers    {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    Get    ${apiRoot}/${apiName}/${apiVersion}/indicators
    ${output}=    Output    response
    ${output}=    Output    response
+2 −2
Original line number Original line Diff line number Diff line
@@ -5,8 +5,8 @@ ${VNFM_SCHEMA} https


${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_TOKEN}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${NEG_AUTHORIZATION}    Bearer negativetoken
${NEG_AUTHORIZATION_TOKEN}    Bearer negativetoken
${BAD_AUTHORIZATION}    Bear sometoken
${BAD_AUTHORIZATION_TOKEN}    Bear sometoken
${ACCEPT_JSON}    application/json
${ACCEPT_JSON}    application/json
${AUTH_USAGE}     1
${AUTH_USAGE}     1
${CONTENT_TYPE_JSON}    application/json
${CONTENT_TYPE_JSON}    application/json
Loading