Commit 6ebbfeb3 authored by Najam UI Hassan's avatar Najam UI Hassan Committed by Giacomo Bernini
Browse files

templating, minor bugs fix and new testcases added

parent 420a7746
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@ Get information about multiple alarms with invalid attribute-based filtering par
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
    

Get information about multiple alarms as a Paged Response
    [Documentation]    Test ID: 8.3.3.1.5
    ...    Test title: Get information about multiple alarms as a Paged Response
@@ -161,7 +160,7 @@ Get information about multiple alarms with malformed authorization token
    ...    Test title: Get information about multiple alarms with malformed authorization token
    ...    Test objective: The objective is to test that the retrieval of information about the alarm list fails when using malformed authorization token
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [3] v3.3.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [5] v3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
@@ -173,7 +172,7 @@ Get information about multiple alarms without authorization token
    ...    Test title: Get information about multiple alarms without authorization token
    ...    Test objective: The objective is to test that the retrieval of information about the alarm list fails when omitting the authorization token
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [3] v3.3.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [5] v3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
@@ -185,7 +184,7 @@ GET information about multiple alarms with expired or revoked authorization toke
    ...    Test title: GET information about multiple alarms with expired or revoked authorization token
    ...    Test objective: The objective is to test that the retrieval of information about the alarm list fails when using expired or revoked authorization token
    ...    Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [3] v3.3.1
    ...    Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [5] v3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
+8 −6
Original line number Diff line number Diff line
*** Settings ***
Library    String
Resource   environment/variables.txt
Library    REST     ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT}
Library    JSONLibrary
@@ -173,7 +174,8 @@ POST Subscription
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
@@ -196,7 +198,8 @@ POST Subscription Duplication permitted
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
@@ -209,14 +212,14 @@ Check Postcondition FaultManagement Subscription Is Set
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    200

    
POST Subscription Duplication not permitted
    Log    Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
    Pass Execution If    ${NFVMANO_DUPLICATION} == 1    NVFO is not permitting duplication. Skipping the test
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    @{response}    ${outputResponse}
@@ -233,7 +236,6 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab
    Validate Json    FMSubscription.schema.json    ${result}
    Log    Validated FMSubscription schema
    
    
GET Subscriptions
    Log    Get the list of active subscriptions
    Set Headers    {"Accept": "${ACCEPT}"}
+20 −8
Original line number Diff line number Diff line
@@ -35,8 +35,20 @@ Get information about an fault management individual alarm
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarm
    
PUT Alarm - Method not implemented
Get information about an fault management individual alarm - Not Found
    [Documentation]    Test ID: 8.3.3.2.3
    ...    Test title: Get information about an fault management individual alarm
    ...    Test objective: The objective is to test the retrieval of information about an individual alarm fails when the resource is not present.
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.4.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Fault Management Individual Alarm
    Check HTTP Response Status Code Is    404

PUT Alarm - Method not implemented
    [Documentation]    Test ID: 8.3.3.2.4
    ...    Test title: PUT Alarm - Method not implemented
    ...    Test objective: he objective is to test that PUT method is not allowed to for fault management individual alarm on NFV-MANO 
    ...    Pre-conditions: The related alarm exists
@@ -48,9 +60,9 @@ PUT Alarm - Method not implemented
    Check HTTP Response Status Code Is    405

PATCH Fault Management Individual Alarm
    [Documentation]    Test ID: 8.3.3.2.4
    [Documentation]    Test ID: 8.3.3.2.5
    ...    Test title: PATCH Fault Management Individual Alarm
    ...    Test objective: The objective is to Modify an individual alarm resource and perform a JSON schema and content validation of the returned alarm data structure
    ...    Test objective: The objective is to Modify an individual alarm resource, and perform a JSON schema validation of the returned alarm data structure.
    ...    Pre-conditions: The related alarm exists
    ...    Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -61,9 +73,9 @@ PATCH Fault Management Individual Alarm
    Check HTTP Response Body Json Schema Is  AlarmModification

Modify an individual alarm resource - Precondition failed
    [Documentation]    Test ID: 8.3.3.2.5
    [Documentation]    Test ID: 8.3.3.2.6
    ...    Test title: Modify an individual alarm resource - Precondition failed
    ...    Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set
    ...    Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set, and perform a JSON schema validation of the returned data structure.
    ...    Pre-conditions: The related alarm exists
    ...    Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -75,9 +87,9 @@ Modify an individual alarm resource - Precondition failed
    Check Postcondition fault management individual alarm exists  

Modify an individual alarm resource - Conflict
    [Documentation]    Test ID: 8.3.3.2.6
    [Documentation]    Test ID: 8.3.3.2.7
    ...    Test title: Modify an individual alarm resource - Conflict
    ...    Test objective: The objective is to test that an individual alarm resource cannot be modified if the resource was modified by another entity
    ...    Test objective: The objective is to test that an individual alarm resource cannot be modified if the resource was modified by another entity , and perform a JSON schema validation of the returned data structure.
    ...    Pre-conditions: The related alarm exists
    ...    Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -89,7 +101,7 @@ Modify an individual alarm resource - Conflict
    Check Postcondition fault management individual alarm exists

DELETE Alarm - Method not implemented
     [Documentation]    Test ID: 8.3.3.2.7
     [Documentation]    Test ID: 8.3.3.2.8
    ...    Test title: DELETE Alarm - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete fault management individual alarm on NFV-MANO.
    ...    Pre-conditions: none
+15 −3
Original line number Diff line number Diff line
@@ -32,8 +32,20 @@ Get Information about an individual subscription
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    FmSubscription
    
PUT an individual subscription - Method not implemented
Get Information about an individual subscription - Not Found
    [Documentation]    Test ID: 8.3.3.4.3
    ...    Test title: Get Information about an individual subscription - Not Found
    ...    Test objective: The objective is to test the retrieval of individual subscription from NFV-MANO alarms fails when the resource is not present.
    ...    Pre-conditions: none
    ...    Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual Subscription
    Check HTTP Response Status Code Is    404

PUT an individual subscription - Method not implemented
    [Documentation]    Test ID: 8.3.3.4.4
    ...    Test title:PUT an individual subscription - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed for fault management individual subscription on VNF  
    ...    Pre-conditions:  none
@@ -45,7 +57,7 @@ PUT an individual subscription - Method not implemented
    Check HTTP Response Status Code Is    405

PATCH an individual subscription - Method not implemented
    [Documentation]    Test ID: 8.3.3.4.4
    [Documentation]    Test ID: 8.3.3.4.5
    ...    Test title:PATCH an individual subscription - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed for fault management individual subscription on VNF  
    ...    Pre-conditions:  none
@@ -57,7 +69,7 @@ PATCH an individual subscription - Method not implemented
    Check HTTP Response Status Code Is    405
    
DELETE an individual subscription
    [Documentation]    Test ID: 8.3.3.4.5
    [Documentation]    Test ID: 8.3.3.4.6
    ...    Test title:DELETE an individual subscription
    ...    Test objective: The objective is to test that DELETE method removes individual subscription on VNF   
    ...    Pre-conditions: The Subsbcription already exists
+0 −2
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
    

Get information about multiple alarms - Bad Request Response too Big
    [Documentation]    Test ID: 8.3.3.3.8
    ...    Test title:  Get information about multiple alarms - Bad Request Response too Big
@@ -190,7 +189,6 @@ Get subscriptions with filter "filter.probableCauses"
    Check HTTP Response Body Json Schema Is   FmSubscriptions
    Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_probableCauses"

    
PUT subscriptions - Method not implemented
    [Documentation]    Test ID: 8.3.3.3.14
    ...    Test title:PUT subscriptions - Method not implemented
Loading