Commit babac9b5 authored by Giacomo Bernini's avatar Giacomo Bernini Committed by Giacomo Bernini
Browse files

added oauth scope tests for VNF Snaphot Mgmt VNF Snapshots

parent 4947cef9
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
@@ -193,3 +193,28 @@ GET information about multiple VNF Snapshot Packages with Filter
    GET multiple VNF Snapshot Packages using filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    VnfSnapshotPkgInfos

POST Create a VNF Snapshot Package with permitted authorization scope
    [Documentation]    Test ID: 5.3.7.2.16
    ...    Test title: POST Create a VNF Snapshot Package with permitted authorization scope
    ...    Test objective: The objective is to test that POST method creates a VNF Snapshot Package with permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST VNF Snapshot Packages with permitted authorization scope
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    VnfSnapshotPkgInfo

POST Create a VNF Snapshot Package with not permitted authorization scope
    [Documentation]    Test ID: 5.3.7.2.17
    ...    Test title: POST Create a VNF Snapshot Package with not permitted authorization scope
    ...    Test objective: The objective is to test that POST method fails to creat a VNF Snapshot Package when using a not permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST VNF Snapshot Packages with not permitted authorization scope
    Check HTTP Response Status Code Is    401
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -4,6 +4,13 @@ ${NFVO_PORT} 8081 # Listening port of the NFVO
${NFVO_SCHEMA}    https
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

${OAUTH_ENCRIPTION_ALGORITHM}    HS256
${PACKAGE_PERMITTED_SCOPE}    vnfsnapshotpkgm:v2:vnf_snapshot_packages  
${PACKAGE_NOT_PERMITTED_SCOPE}    vnfsnapshotpkgm:v2:vnf_snapshot_packages:readonly

${NOT_PERMITTED_SCOPE}    vnfsnapshotpkgm:v2:invalid

${ACCEPT_JSON}    application/json
${AUTH_USAGE}     1
${CONTENT_TYPE_JSON}    application/json