Commit 04d7a858 authored by M. Rehan Abbasi's avatar M. Rehan Abbasi
Browse files

add error 422 test case in FM API

parent 54a7c240
Loading
Loading
Loading
Loading
+68 −57

File changed.

Preview size limit exceeded, changes collapsed.

+20 −7
Original line number Original line Diff line number Diff line
@@ -8,9 +8,9 @@ Library JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    JSONSchemaLibrary    schemas/


*** Test Cases ***
*** Test Cases ***
Create a new Fault Management alarm subscription
POST Create a new Fault Management alarm subscription
    [Documentation]    Test ID:8.3.3.3.1
    [Documentation]    Test ID:8.3.3.3.1
    ...    Test title: Create a new fault management alarm subscription
    ...    Test title: POST Create a new fault management alarm subscription
    ...    Test objective: The objective is to create a new fault management alarm subscription and perform a JSON schema validation of the returned fault management alarms subscription data structure
    ...    Test objective: The objective is to create a new fault management alarm subscription and perform a JSON schema validation of the returned fault management alarms subscription data structure
    ...    Pre-conditions: No subscription with the same filter and callbackUri exists
    ...    Pre-conditions: No subscription with the same filter and callbackUri exists
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
@@ -23,9 +23,9 @@ Create a new Fault Management alarm subscription
    Check HTTP Response Header Contains Location
    Check HTTP Response Header Contains Location
    Check PostCondition Subscription is created
    Check PostCondition Subscription is created


Create a new alarm subscription - DUPLICATION
POST Create a new alarm subscription - DUPLICATION
     [Documentation]    Test ID: 8.3.3.3.2
     [Documentation]    Test ID: 8.3.3.3.2
    ...    Test title: Create a new alarm subscription - DUPLICATION
    ...    Test title: POST Create a new alarm subscription - DUPLICATION
    ...    Test objective: The objective is to create a new subscription with the NFV-MANO allowing duplication and perform a JSON schema validation of the returned fault management alarms subscription data structure.
    ...    Test objective: The objective is to create a new subscription with the NFV-MANO allowing duplication and perform a JSON schema validation of the returned fault management alarms subscription data structure.
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
@@ -38,9 +38,9 @@ Create a new alarm subscription - DUPLICATION
    Check HTTP Response Header Contains Location
    Check HTTP Response Header Contains Location
    Check Postcondition FaultManagement Subscription Is Set
    Check Postcondition FaultManagement Subscription Is Set


Create a new alarm subscription - NO DUPLICATION
POST Create a new alarm subscription - NO DUPLICATION
    [Documentation]    Test ID: 8.3.3.3.3
    [Documentation]    Test ID: 8.3.3.3.3
    ...    Test title: Create a new alarm subscription - NO DUPLICATION
    ...    Test title: POST Create a new alarm subscription - NO DUPLICATION
    ...    Test objective: The objective is to create a new subscription with the NFV-MANO not allowing duplication and perform a JSON schema validation of the returned fault management alarms subscription data structure.
    ...    Test objective: The objective is to create a new subscription with the NFV-MANO not allowing duplication and perform a JSON schema validation of the returned fault management alarms subscription data structure.
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
@@ -223,3 +223,16 @@ DELETE subscriptions - Method not implemented
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    DELETE Subscriptions
    DELETE Subscriptions
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405

POST Create a new Fault Management alarm subscription - Unprocessable entity
    [Documentation]    Test ID:8.3.3.3.17
    ...    Test title: POST Create a new fault management alarm subscription - Unprocessable entity
    ...    Test objective: The objective is to test that a new fault management alarm subscription is not created if the notification endpoint is unreachable by the NFV-MANO.
    ...    Pre-conditions: No subscription with the same filter and callbackUri exists.
    ...    Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
    ...    Config ID:   Config_prod_NFV-MANO
    ...    Applicability: Notification endpoint is unreachable by the NFV-MANO.
    ...    Post-Conditions: none
    POST Subscription with Unreachable callbackUri
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails
+6 −4
Original line number Original line Diff line number Diff line
@@ -2,13 +2,14 @@
${NFVMANO_HOST}      localhost    # Hostname of the NFV-MANO
${NFVMANO_HOST}      localhost    # Hostname of the NFV-MANO
${NFVMANO_PORT}      8080    # Listening port of the NFV-MANO
${NFVMANO_PORT}      8080    # Listening port of the NFV-MANO
${NFVMANO_SCHEMA}    https
${NFVMANO_SCHEMA}    https
${AUTHORIZATION}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${AUTHORIZATION_HEADER}   Authorization
${AUTHORIZATION_TOKEN}    Bearer    QWxhZGRpbjpvcGVuIHNlc2FtZQ==
${CONTENT_TYPE}    application/json
${CONTENT_TYPE}    application/json
${ACCEPT}         application/json
${ACCEPT}         application/json
${ACCEPT_JSON}         application/json
${ACCEPT_JSON}         application/json
${AUTH_USAGE}     1
${AUTH_USAGE}     1
${NEG_AUTHORIZATION}    Bearer negativetoken
${NEG_AUTHORIZATION_TOKEN}    Bearer negativetoken
${BAD_AUTHORIZATION}    Bear sometoken
${BAD_AUTHORIZATION_TOKEN}    Bear sometoken
${apiRoot}        /
${apiRoot}        /
${apiName}        nfvmanofm
${apiName}        nfvmanofm
${apiMajorVersion}     v1
${apiMajorVersion}     v1
@@ -36,8 +37,9 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${faultyResourceType}    
${faultyResourceType}    
${notification_type}    AlarmNotification
${notification_type}    AlarmNotification


${callback_uri}    http://localhost
${callback_port}    9091
${callback_port}    9091
${callback_uri}    http://localhost:${callback_port}
${unreachable_callback_uri}   http://unreachable-callbackUri-error-422
${callback_endpoint}    /endpoint
${callback_endpoint}    /endpoint
${callback_endpoint_fwd}    /endpoint/check
${callback_endpoint_fwd}    /endpoint/check
${callback_endpoint_error}    /endpoint_404
${callback_endpoint_error}    /endpoint_404