Commit f22aace5 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fixed issue #186 on 2.6.1-fix-plu

parent 95ff88d6
Loading
Loading
Loading
Loading
+26 −2
Original line number Diff line number Diff line
@@ -177,11 +177,11 @@ GET Subscriptions as a Paged Response
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: The VNFM supports response paging for the subscriptions resources
    ...    Post-Conditions: none 
    Get subscriptions
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    Check HTTP Response Header Contain Link
    
GET subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.1.17.15
@@ -196,6 +196,30 @@ GET subscriptions - Bad Request Response too Big
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails

Void
     [Documentation]    Test ID: 7.3.1.17.16
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void

GET Subscriptions as a Paged Response with nextpage_opauque_marker parameter 
     [Documentation]    Test ID: 7.3.1.17.17
    ...    Test title: GET Subscriptions as a Paged Response with nextpage_opauque_marker parameter 
    ...    Test objective: The objective is to Get the list of active subscriptions as a Paged Response and retrieve the next page using the nextpage_opaque_marker parameter
    ...    Pre-conditions: A request for retrieving subscriptions as a paged response has been successfully issued (Test ID: 7.3.1.17.14)
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: The VNFM supports response paging for the subscriptions resources
    ...    Post-Conditions: none 
    Get subscriptions with nextpage_opaque_marker parameter 
    Check HTTP Response Status Code Is    200


*** Keywords ***
Void
    Log    do nothing
 No newline at end of file
+27 −2
Original line number Diff line number Diff line
@@ -1245,6 +1245,20 @@ Get subscriptions
    Get    ${apiRoot}/${apiName}/${apiVersion}/subscriptions	
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

Get subscriptions with nextpage_opaque_marker parameter
    Log    Get next page of subscriptions
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query using the URI provided in the previous GET request and validate response
    Get    ${nextPageUri}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}




Get subscriptions - filter
    Log    Get the list of active subscriptions using a filter
    Set Headers    {"Accept": "${ACCEPT}"}
@@ -1417,6 +1431,17 @@ GET test endpoint
    Verify Mock Expectation  ${req}
    Clear Requests  ${callback_endpoint}    	    	

Check HTTP Response Header Contain Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
    Log    Check that Link header contains rel set to next
    Should Contain    ${linkURL}    rel="next"
    Log    Check that Link header contains URI to next page between <>
    ${linkHeaderUri}=    Get Regexp Matches    ${linkURL}    (?<=\<)(.*?)(?=\>)
    ${length}=    Get Length    ${linkHeaderUri}	
    Should Be Equal As Integers	${length}	0
    Set Global Variable    ${nextPageUri}    ${linkHeaderUri[0]} 

Check LINK in Header
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
+1 −0
Original line number Diff line number Diff line
@@ -48,3 +48,4 @@ ${callback_endpoint_error} /endpoint_404
${callback_uri}    http://localhost
${callback_port}    9091

${nextPageUri}    someuri
 No newline at end of file