diff --git a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot index c742db50ad13d3ca2acec360d0b019635a227bfc..5f8fa000becc15716272f6b138cb0a18b3599624 100644 --- a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot +++ b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot @@ -67,6 +67,7 @@ DELETE an individual subscription ... Post-Conditions: The NS instance usage notification subscription is not available anymore on NFVO DELETE Individual Subscription Check HTTP Response Status Code Is 204 + Check Postcondition Individual Subscription is Deleted GET Information about an individual subscription - NOT FOUND [Documentation] Test ID: 9.3.4.2.6 diff --git a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot index 0a71abbbc1b26eafc51bf42397e49a476667aa40..dd61944508300ffba05861441ca4999557f5f02b 100644 --- a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot +++ b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot @@ -225,3 +225,38 @@ Get subscriptions with exclude_default and fields attribute selector GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} + +Check Postcondition Individual Subscription is Deleted + Log Check Postcondition Subscription is deleted + GET individual Subscription + Check HTTP Response Status Code Is 404 + +Check Postcondition Subscription Is Set + Log Check Postcondition subscription exist + Log Trying to get the subscription + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + +Check Postcondition Subscription Resource Returned in Location Header Is Available + Log Going to check postcondition + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${response['headers']['Location']} + Integer response status 200 + Log Received a 200 OK as expected + ${contentType}= Output response headers Content-Type + Should Contain ${contentType} application/json + ${result}= Output response body + Validate Json NsdmSubscription.schema.json ${result} + Log Validated NsdmSubscription schema + ${body}= Get File jsons/subscriptions.json + ${subscription}= evaluate json.loads('''${body}''') json + Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} + Log Validated Issued subscription is same as original + +Check Postcondition Subscriptions Exist + Log Checking that subscriptions exists + Get Subscriptions \ No newline at end of file diff --git a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot index dd9d259e19f3b00fe7891817eef271dabfef5deb..efde683fa76707e8bc364670e44e5656aa83c93b 100644 --- a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot +++ b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot @@ -21,6 +21,7 @@ POST Create a new subscription Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is subscription Check HTTP Response Header Contains Resource URI + Check Postcondition Subscription Is Set POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 9.3.4.1.2 @@ -36,6 +37,7 @@ POST Create a new Subscription - DUPLICATION Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is subscription + Check Postcondition Subscription Resource Returned in Location Header Is Available POST Create a new Subscription - NO-DUPLICATION [Documentation] Test ID: 9.3.4.1.3 @@ -50,6 +52,7 @@ POST Create a new Subscription - NO-DUPLICATION Check Subscription Existence Check HTTP Response Status Code Is 303 Check HTTP Response Header Contains Location + Check Postcondition Subscription Is Set GET Subscriptions [Documentation] Test ID: 9.3.4.1.4 @@ -203,6 +206,7 @@ DELETE subscriptions - Method not implemented ... Post-Conditions: Subscriptions are not deleted DELETE subscriptions Check HTTP Response Status Code Is 405 + Check Postcondition Subscriptions Exist GET subscriptions with "exclude_default" and "fields" attribute selector [Documentation] Test ID: 9.3.4.1.16 @@ -211,8 +215,8 @@ GET subscriptions with "exclude_default" and "fields" attribute selector ... Pre-conditions: ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_default and fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is subscriptions \ No newline at end of file