Commit 154e9ef9 authored by Giacomo Bernini's avatar Giacomo Bernini Committed by Giacomo Bernini
Browse files

[fix-test][SOL005][NFVI-Capacity][v5.2.1][5.3.6.x.y Test-IDs] fix - check...

[fix-test][SOL005][NFVI-Capacity][v5.2.1][5.3.6.x.y Test-IDs] fix - check Location Header and resource availability in SOL005 NFVI Capacity mgmt - item #8 in NFVSOL(25)000288
parent 2eadc459
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@ POST Create Capacity Threshold
    POST Create a Capacity Threshold
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    CapacityThreshold
    Check HTTP Response Contains Resource URI
    Check HTTP Response Header Contains    Location
    Check Postcondition CapacityThreshold Resource Returned in Location Header Is Available

POST Create Capacity Threshold - Unprocessible Content
    [Documentation]    Test ID: 5.3.6.5.2
+17 −0
Original line number Diff line number Diff line
@@ -434,6 +434,23 @@ Check HTTP Response Contains Resource URI
    ${ResourceURI}=    Get Value From Json    ${response['headers']}    $..Location
    Should Not Be Empty    ${ResourceURI}

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

Check Postcondition CapacityThreshold 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    CapacityThreshold.schema.json    ${result}
    Log    Validated CapacityThreshold schema

GET Capacity Thresholds
    log    Trying to get information about multiple Capacity Thresholds
    Set Headers    {"Accept":"${ACCEPT_JSON}"}