Commit f9a9e421 authored by M. Rehan Abbasi's avatar M. Rehan Abbasi Committed by Giacomo Bernini
Browse files

add error 422 test case in Log Mgmt API

parent 7ed25da8
Loading
Loading
Loading
Loading
+65 −55

File changed.

Preview size limit exceeded, changes collapsed.

+20 −7
Original line number Diff line number Diff line
@@ -117,9 +117,9 @@ Get subscriptions with filter "filter.notificationTypes"
    Check HTTP Response Body Json Schema Is   LogmSubscriptions 
    Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_notificationTypes"
    
Create new Subscription
POST Create new Subscription
    [Documentation]    Test ID: 8.3.4.5.9
    ...    Test title: Create new Subscription
    ...    Test title: POST Create new Subscription
    ...    Test objective: The objective is to test the creation of a new subscription to log management notification and perform a JSON schema and content validation of the returned subscription data structure
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
@@ -132,10 +132,10 @@ Create new Subscription
    Check HTTP Response Body LogmSubscription Attributes Values Match the Issued Subscription
    Check Postcondition Subscription Is Set 

Create request for duplicated Subscription not creating duplicated subscriptions
POST Create request for duplicated Subscription not creating duplicated subscriptions
    [Tags]    no-duplicated-subs
    [Documentation]    Test ID: 8.3.4.5.10
    ...    Test title: Create request for duplicated Subscription not creating duplicated subscriptions
    ...    Test title: POST Create request for duplicated Subscription not creating duplicated subscriptions
    ...    Test objective: The objective is to test the attempt of a creation of a duplicated subscription failed and check that no new subscription is created and a link to the original subscription is returned
    ...    Pre-conditions: At least one subscription is available in the NFV-MANO.
    ...    Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
@@ -148,10 +148,10 @@ Create request for duplicated Subscription not creating duplicated subscriptions
    Check HTTP Response Header Contains    Location
    Check Postcondition Subscription Resource Returned in Location Header Is Available

Create request for duplicated Subscription creating duplicated subscriptions
POST Create request for duplicated Subscription creating duplicated subscriptions
    [Tags]    duplicated-subs
    [Documentation]    Test ID: 8.3.4.5.11
    ...    Test title: Create request for duplicated Subscription creating duplicated subscriptions
    ...    Test title: POST Create request for duplicated Subscription creating duplicated subscriptions
    ...    Test objective: The objective is to test the creation of a duplicated subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure
    ...    Pre-conditions: At least one subscription is available in the NFV-MANO.
    ...    Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v3.5.1
@@ -199,3 +199,16 @@ DELETE Subscriptions - Method not implemented
    ...    Post-Conditions: none  
    Send Delete Request for Subscriptions
    Check HTTP Response Status Code Is    405

POST Create new Subscription - Unprocessable entity
    [Documentation]    Test ID: 8.3.4.5.15
    ...    Test title: POST Create new Subscription - Unprocessable entity
    ...    Test objective: The objective is to test that a new log management subscription is not created if the notification endpoint is unreachable by the NFV-MANO.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.7.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
    Send Post Request for Subscription with unreachable callbackUri
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    ProblemDetails
+5 −4
Original line number Diff line number Diff line
@@ -6,10 +6,10 @@ ${NFVMANO_SCHEMA} https
${logJobId}       0b000d4f1a2b67
${erroneousLogJobId}    wrongID


${AUTHORIZATION}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${NEG_AUTHORIZATION}    Bearer negativetoken
${BAD_AUTHORIZATION}    Bear sometoken
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${NEG_AUTHORIZATION_TOKEN}    Bearer negativetoken
${BAD_AUTHORIZATION_TOKEN}    Bear sometoken

${CONTENT_TYPE}    application/json
${CONTENT_TYPE_JSON}    application/json
@@ -30,6 +30,7 @@ ${origResponse} {}

${callback_port}    9091
${callback_uri}    http://172.22.1.7:${callback_port}
${unreachable_callback_uri}   http://unreachable_callback_uri-error-422
${callback_endpoint}    /nfvmanologm/subscriptions
${filter_ok}      callbackUri=${callbackUri}
${filter_ko}      erroneousFilter=erroneous