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

[fix-test][SOL005][NS-PM][v5.2.1][5.3.4.x.y Test-IDs] fix - check Location...

[fix-test][SOL005][NS-PM][v5.2.1][5.3.4.x.y Test-IDs] fix - check Location Header and resource availability in SOL005 NS PM - item #8 in NFVSOL(25)000288
parent 97247576
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -800,6 +800,30 @@ Check HTTP Response Header Contains Location
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}

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

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

JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
+4 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ Create new NS Performance Monitoring Job
    Send Post Request Create new NS Performance Monitoring Job
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is   PmJob
    Check HTTP Response Header Contains    Location
    Check Postcondition PmJob Resource Returned in Location Header Is Available
    Check Postcondition PmJob Exists

PUT all NS Performance Monitoring Jobs - Method not implemented
@@ -184,6 +186,8 @@ GET all NS Performance Monitoring Jobs as Paged Response
    GET all NS Performance Monitoring Jobs
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains Location
    Check Postcondition PmJob Resource Returned in Location Header Is Available

    
GET NS Performance Monitoring Jobs - Bad Request Response too Big
    [Documentation]    Test ID: 5.3.4.1.14
+3 −1
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ Create new Performance Threshold
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is   Threshold
    Check HTTP Response Header Contains    Location
    Check Postcondition Threshold Resource Returned in Location Header Is Available
    Check Postcondition Threshold Exists

PUT Performance Thresholds - Method not implemented
@@ -129,6 +130,7 @@ GET All Performance Thresholds as Paged Response
    GET all Performance Thresholds
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains Location
    Check Postcondition Threshold Resource Returned in Location Header Is Available

GET Performance Thresholds - Bad Request Response too Big
    [Documentation]    Test ID: 5.3.4.4.10