Commit d93249ab authored by Eisha Ayaz's avatar Eisha Ayaz
Browse files

[test-new][SOL003][VNF-LCM][v5.3.1][7.3.1.x.x Test-IDs][NFVSOL(26)000093] New...

[test-new][SOL003][VNF-LCM][v5.3.1][7.3.1.x.x Test-IDs][NFVSOL(26)000093] New tests for 401/404 gaps identified by tacker
parent a56be61a
Loading
Loading
Loading
Loading
+26 −3
Original line number Diff line number Diff line
@@ -58,15 +58,14 @@ PATCH an individual subscription - Method not implemented
DELETE an individual subscription
    [Documentation]    Test ID: 7.3.1.18.5
    ...    Test title: DELETE an individual subscription
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Test objective: The objective is to test the deletion of individual subscription
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: subscription deleted from VNFM
    Delete Individual subscription
	Check HTTP Response Status Code Is    405
	
	Check HTTP Response Status Code Is    204
GET Individual Subscription - Not Found
    [Documentation]    Test ID: 7.3.1.18.6
    ...    Test title: GET Individual Subscription - Not Found
@@ -118,3 +117,27 @@ GET Individual Subscription - Unauthorized
    Get Individual Subscription - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
DELETE an individual subscription - Unauthorized
     [Documentation]    Test ID: 7.3.1.18.10
    ...    Test title: DELETE an individual subscription
    ...    Test objective: The objective is to test that the method fails called without authorization
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: subscription deleted from VNFM
    Delete Individual subscription - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
DELETE an individual subscription - Not Found
     [Documentation]    Test ID: 7.3.1.18.11
    ...    Test title: DELETE an individual subscription that is not found
    ...    Test objective: The objective is to test that the method fails when subscription is not found
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: subscription deleted from VNFM
    Delete Individual subscription - Not Found
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+49 −1
Original line number Diff line number Diff line
@@ -170,6 +170,54 @@ Get Information about an individual VNF Instance - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails 

PATCH Individual VNFInstance - Unauthorized
    [Documentation]    Test ID: 7.3.1.2.13
    ...    Test title: PATCH Individual VNFInstance - Unauthorized
    ...    Test objective: The objective is to test that modification of a VNF instance resource fails without authorization
    ...    Pre-conditions: an existing VNF instance resource
    ...    Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH individual vnfInstance - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
PATCH Individual VNFInstance - Not Found
    [Documentation]    Test ID: 7.3.1.2.14
    ...    Test title: PATCH Individual VNFInstance - Not Found
    ...    Test objective: The objective is to test that modification of a VNF instance resource fails when instance is not present
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH individual vnfInstance - Not Found
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
DELETE Individual VNFInstance - Unauthorized
    [Documentation]    Test ID: 7.3.1.2.15
    ...    Test title: DELETE Individual VNFInstance - Unauthorized
    ...    Test objective: The objective is to test that deletion of a VNF instance resource fails without authorization
    ...    Pre-conditions: an existing VNF instance resource
    ...    Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: VNFInstance deleted
    DELETE individual vnfInstance - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
DELETE Individual VNFInstance - Not Found
    [Documentation]    Test ID: 7.3.1.2.16
    ...    Test title: DELETE Individual VNFInstance - Not Found
    ...    Test objective: The objective is to test that deletion of a VNF instance resource fails when instance is not present
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE individual vnfInstance - Not Found
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
*** Keywords ***
Check resource existence
    Set Headers    {"Accept":"${ACCEPT}"}
+51 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ PATCH Individual VNF Snapshot - Success

PATCH Individual VNF Snapshot - Conflict
    [Documentation]    Test ID: 7.3.1.41.6
    ...    Test title: PATCH Individual VNF Snapshot - Success
    ...    Test title: PATCH Individual VNF Snapshot - Conflict
    ...    Test objective: The objective is to test that PATCH method cannot modify an individual VNF Snapshot resource due to the fact that another modification is ongoing.
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.24.3.4 - ETSI GS NFV-SOL 003 [1] v5.3.1
@@ -159,3 +159,53 @@ GET Information about an individual VNF Snapshot - Unauthorized
    GET Individual VNF Snapshot - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails

PATCH Individual VNF Snapshot - Unauthorized
    [Documentation]    Test ID: 7.3.1.41.13
    ...    Test title: PATCH Individual VNF Snapshot - Unauthorized
    ...    Test objective: The objective is to test that the modification of individual VNF Snapshot cannot be executed because the request is not authorized
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.24.3.4 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH individual VNF Snapshot - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
PATCH Individual VNF Snapshot - Not found
    [Documentation]    Test ID: 7.3.1.41.14
    ...    Test title: PATCH Individual VNF Snapshot - Not found
    ...    Test objective: The objective is to test that the modification of individual VNF Snapshot fails because the specified individual VNF Snapshot resource cannot be found.
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.24.3.4 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH individual VNF Snapshot - Not found
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
DELETE Individual VNF Snapshot - Unauthorized
    [Documentation]    Test ID: 7.3.1.41.15
    ...    Test title: DELETE Individual VNF Snapshot - Unauthorized
    ...    Test objective: The objective is to test that the deletion of individual VNF Snapshot cannot be executed because the request is not authorized
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.24.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE individual VNF Snapshot - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails

DELETE Individual VNF Snapshot - Not found
    [Documentation]    Test ID: 7.3.1.41.16
    ...    Test title: DELETE Individual VNF Snapshot - Not found
    ...    Test objective: The objective is to test that the deletion of individual VNF Snapshot cannot be executed because the specified individual VNF Snapshot resource cannot be found.
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.24.3.5 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE individual VNF Snapshot - Not found
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+59 −1
Original line number Diff line number Diff line
@@ -87,6 +87,40 @@ DELETE Notification endpoint - Method Not Implemented
    ...    Post-Conditions: none 
    DELETE notification endpoint
    Check HTTP Response Status Code Is    405

VNF LCM Operation Occurrence - Unauthorized
    [Documentation]    Test ID: 7.3.1.36.8
    ...    Test title: VNF LCM Operation Occurrence Notification - Unauthorized
    ...    Test objective: The objective is to test that the POST request triggers VNF LCM Operation Occurrence Notification without authorization.
    ...    Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM.
    ...    Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
    Post VNF LCM Operation Occurrence Notification - Unauthorized
    Check HTTP Response Status Code Is    401
Test the Notification Endpoint - Unauthorized
    [Documentation]    Test ID: 7.3.1.36.9
    ...    Test title: Test the Notification Endpoint - Unauthorized
    ...    Test objective: The objective is to test the Notification Endpoint provided by the notification consumer without authorization.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 5.4.20.3.2 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get reach the notification endpoint - Unauthorized
    Check HTTP Response Status Code Is    401
Test the Notification Endpoint - Not found
    [Documentation]    Test ID: 7.3.1.36.10
    ...    Test title: Test the Notification Endpoint - Not found
    ...    Test objective: The objective is to test the Notification Endpoint provided by the notification consumer when it is not found.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 5.4.20.3.2 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get reach the notification endpoint - Not found
    Check HTTP Response Status Code Is    404
*** Keywords ***
Check resource existence and get CallbackUri
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
@@ -113,7 +147,16 @@ Post VNF LCM Operation Occurrence Notification
    Post    ${callbackResp}    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}	
	
Post VNF LCM Operation Occurrence Notification - Unauthorized
    log    Trying to perform a POST to get notification without authorization
    Set Headers  {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    ${template} =    Get File    jsons/VnfLcmOperationOccurrenceNotification.json
    ${body}=        Format String   ${template}    subscriptionId=${subscriptionId}    vnfInstanceId=${vnfInstanceId}    vnfLcmOpOccId=${vnfLcmOpOccId}   
    Post    ${callbackResp}    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}		
Post VNF Identifier Creation Notification
    log    Trying to perform a POST to get notification
    Set Headers  {"Accept":"${ACCEPT}"}
@@ -145,6 +188,21 @@ GET reach the notification endpoint
    GET    ${callbackResp}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
GET reach the notification endpoint - Unauthorized
    Log    Trying to reach the notification endpoint using GET method without authorization.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    GET    ${callbackResp}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
GET reach the notification endpoint - Not found
    Log    Trying to reach the notification endpoint using GET method with an invalid URL. 
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${invalid_callbackResp}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
PUT notification endpoint  
    Log    Trying to perform a PUT. This method should not be implemented.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
+12 −0
Original line number Diff line number Diff line
@@ -274,6 +274,18 @@ GET Subscription with invalid resource endpoint
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET Subscriptions - Unauthorized
    [Documentation]    Test ID: 7.3.1.17.22
    ...    Test title: GET Subscriptions - Unauthorized
    ...    Test objective: The objective is to test that the retrieval of the list of active subscriptions fails without authorization.
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get subscriptions - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails
*** Keywords ***
Void
    Log    do nothing
Loading