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

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

[fix-test][SOL005][NS-LCM][v5.2.1][5.3.2.x.y Test-IDs] fix - check Location Header and resource availability in SOL005 NS LCM - item #8 in NFVSOL(25)000288
parent ae9b25cc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ POST Heal a NSInstance
    POST Heal NSInstance
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available

POST Heal a NSInstance - Conflict (Not Instantited)
    [Documentation]    Test ID: 5.3.2.6.2
@@ -94,6 +95,7 @@ POST Heal a NSInstance with permitted authorization scope
    POST Heal NSInstance with permitted authorization scope
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available

POST Heal a NSInstance with not permitted authorization scope
    [Documentation]    Test ID: 5.3.2.6.7
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ POST Instantiate a nsInstance
    POST Instantiate nsInstance
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available
    Check Operation Occurrence Id

POST Instantiate a nsInstance with feasibility check only
@@ -34,6 +35,7 @@ POST Instantiate a nsInstance with feasibility check only
    POST Instantiate nsInstance with feasibility check only
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available
    Check Operation Occurrence Id

POST Instantiate a nsInstance Conflict
@@ -109,6 +111,7 @@ POST Instantiate a nsInstance with permitted authorization scope
    POST Instantiate nsInstance with permitted authorization scope
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available
    Check Operation Occurrence Id

POST Instantiate a nsInstance with not permitted authorization scope
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ POST Create a new NsInstance
    POST New nsInstance
    Check HTTP Response Status Code Is    201
    Check HTTP Response Header Contains    Location
    Check Postcondition NsInstance Resource Returned in Location Header Is Available
    Check HTTP Response Body Json Schema Is    NsInstance
    Check HTTP Response Body NsInstance content against NS Descriptor

+36 −0
Original line number Diff line number Diff line
@@ -1974,6 +1974,42 @@ Check HTTP Response Header Contains Location
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}

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

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

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

PARSE the NS Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 NS descriptor file    ELSE    Fetch Information from SOL006 NS descriptor file

+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ POST Scale a nsInstance
    POST scale nsInstance
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available
    Check resource existence
    
POST Scale a nsInstance - Conflict (Not Instantited)
@@ -95,6 +96,7 @@ POST Scale a nsInstance with permitted authorization scope
    POST scale nsInstance with permitted authorization scope
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Postcondition NsLcmOpOcc Resource Returned in Location Header Is Available
    Check resource existence

POST Scale a nsInstance with not permitted authorization scope
Loading