Commit 07ea6e56 authored by Elian Kraja's avatar Elian Kraja
Browse files

Fix on missing authentication headers

parent a0689c52
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -404,7 +404,7 @@ GET NSD Content with invalid Range Request


Send PUT Request to upload NSD Content as zip file in asynchronous mode
Send PUT Request to upload NSD Content as zip file in asynchronous mode
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"}      verify=False
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}": "${AUTHORIZATION_TOKEN}"}      verify=False
    ${body}=  Get Binary File  ${contentZipFile}
    ${body}=  Get Binary File  ${contentZipFile}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
@@ -413,7 +413,7 @@ Send PUT Request to upload NSD Content as zip file in asynchronous mode


Send PUT Request to upload NSD Content as plain text file in asynchronous mode
Send PUT Request to upload NSD Content as plain text file in asynchronous mode
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"}      verify=False
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "${AUTHORIZATION_HEADER}": "${AUTHORIZATION_TOKEN}", "Content-Type": "text/plain"}      verify=False
    ${body}=  Get File  ${contentPlainFile}
    ${body}=  Get File  ${contentPlainFile}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
@@ -422,7 +422,7 @@ Send PUT Request to upload NSD Content as plain text file in asynchronous mode


Send PUT Request to upload NSD Content as zip file in synchronous mode
Send PUT Request to upload NSD Content as zip file in synchronous mode
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"}      verify=False
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}": "${AUTHORIZATION_TOKEN}"}      verify=False
    ${body}=  Get Binary File  ${contentZipFile}
    ${body}=  Get Binary File  ${contentZipFile}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
@@ -431,7 +431,7 @@ Send PUT Request to upload NSD Content as zip file in synchronous mode


Send PUT Request to upload NSD Content as plain text file in synchronous mode
Send PUT Request to upload NSD Content as plain text file in synchronous mode
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Log    Trying to perform a PUT. This method upload the content of a NSD
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"}      verify=False
    Create Session      nbi     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}  headers={"Accept": "${ACCEPT_PLAIN}", "${AUTHORIZATION_HEADER}": "${AUTHORIZATION_TOKEN}", "Content-Type": "text/plain"}      verify=False
    ${body}=  Get File  ${contentPlainFile}
    ${body}=  Get File  ${contentPlainFile}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    ${response}=    Put Request     nbi     ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
@@ -737,7 +737,7 @@ Get PNFD Content with conflict due to onboarding state
Send PUT Request to upload PNFD Content as plain text file
Send PUT Request to upload PNFD Content as plain text file
    
    
    Log    Trying to perform a PUT. This method upload the content of a PNFD
    Log    Trying to perform a PUT. This method upload the content of a PNFD
    Create Session      pnfd     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}      headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}"}      verify=False
    Create Session      pnfd     ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}      headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "${ACCEPT_PLAIN}", "${AUTHORIZATION_HEADER}": "${AUTHORIZATION_TOKEN}"}      verify=False
    ${body}=  Get Binary File  ${contentZipFile}
    ${body}=  Get Binary File  ${contentZipFile}
    ${response}=    Put Request     pnfd     ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoUpld}/pnfd_content     data=${body}
    ${response}=    Put Request     pnfd     ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoUpld}/pnfd_content     data=${body}
    Should Be Empty     ${response.text}
    Should Be Empty     ${response.text}
+3 −1
Original line number Original line Diff line number Diff line
@@ -6,7 +6,9 @@ ${NFVO_PORT} 8081 # Listening port of the NFVO
${VNFM_SCHEMA}    https
${VNFM_SCHEMA}    https
${NFVO_SCHEMA}    https
${NFVO_SCHEMA}    https


${AUTHORIZATION}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
#${AUTHORIZATION}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE}    application/json
${CONTENT_TYPE}    application/json
${CONTENT_TYPE_PATCH}    application/merge-patch+json
${CONTENT_TYPE_PATCH}    application/merge-patch+json
${ACCEPT_JSON}         application/json
${ACCEPT_JSON}         application/json