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

[fix-test][SOL005][VNF-Snapshot-Management][v5.2.1][5.3.7.x.y Test-IDs] fix -...

[fix-test][SOL005][VNF-Snapshot-Management][v5.2.1][5.3.7.x.y Test-IDs] fix - check Location Header and resource availability in SOL005 VNF Snapshot mgmt - item #8 in NFVSOL(25)000288
parent 289b4b4f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ GET Individual VNF Snapshot Package Artifact - External Artifact
    ...    Post-Conditions: none
    GET Individual VNF Snapshot Package Artifact - External
    Check HTTP Response Status Code Is    302
    Check HTTP Response Contains Resource URI
    Check HTTP Response Header Contains    Location
    Check Postcondition VnfSnapshotPkgInfo Resource Returned in Location Header Is Available
    
PUT Individual VNF Snapshot Package Artifact - Method not implemented 
     [Documentation]    Test ID: 5.3.7.10.8
+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ POST Create a VNF Snapshot Package
    POST VNF Snapshot Packages
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    VnfSnapshotPkgInfo
    Check HTTP Response Header Contains    Location
    Check Postcondition VnfSnapshotPkgInfo Resource Returned in Location Header Is Available

GET information about multiple VNF Snapshot Packages  
    [Documentation]    Test ID: 5.3.7.2.2
@@ -206,6 +208,8 @@ POST Create a VNF Snapshot Package with permitted authorization scope
    POST VNF Snapshot Packages with permitted authorization scope
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    VnfSnapshotPkgInfo
    Check HTTP Response Header Contains    Location
    Check Postcondition VnfSnapshotPkgInfo Resource Returned in Location Header Is Available

POST Create a VNF Snapshot Package with not permitted authorization scope
    [Documentation]    Test ID: 5.3.7.2.17
+17 −0
Original line number Diff line number Diff line
@@ -217,6 +217,23 @@ Check HTTP Response Header Contains Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}

Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
    Log    Header is present

Check Postcondition VnfSnapshotPkgInfo Resource Returned in Location Header Is Available
    Log    Going to check postcondition
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    REST.GET    ${response['headers']['Location']}
    Integer    response status    200
    Log    Received a 200 OK as expected
    ${contentType}=    Output    response headers Content-Type
    Should Contain    ${contentType}    application/json
    ${result}=    Output    response body
    Validate Json    VnfSnapshotPkgInfo.schema.json    ${result}
    Log    Validated VnfSnapshotPkgInfo schema

PUT VNF Snapshot Packages
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT_JSON}"}