From e050659d902066292b1adfe959aa6ed7145cc469 Mon Sep 17 00:00:00 2001 From: Ayesha Ayub Date: Mon, 26 Aug 2024 11:51:39 +0500 Subject: [PATCH 1/3] Update SOL011 document version in all testcases of NSInstanceUsageNotification API --- .../IndividualSubscription.robot | 12 +++---- .../NotificationEndpoint.robot | 2 +- .../Notifications.robot | 4 +-- .../Subscriptions.robot | 32 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot index 5f11fda6f..08ccd509b 100644 --- a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot +++ b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot @@ -12,7 +12,7 @@ POST Individual Subscription - Method not implemented ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 8.5.4.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.4.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -24,7 +24,7 @@ GET Information about an individual subscription - Successful ... Test title: GET Information about an individual subscription - Successful ... Test objective: The objective is to test the retrieval of NS instance usage notification subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. - ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -37,7 +37,7 @@ PUT an individual subscription - Method not implemented ... Test title: PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 8.5.4.3.3 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.4.3.3 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -49,7 +49,7 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 8.5.4.3.4 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.4.3.4 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -61,7 +61,7 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... Test objective: The objective is to test that DELETE method deletes an individual subscription ... Pre-conditions: At least one instance usage notification subscription is available in the NFVO - ... Reference: Clause 8.5.4.3.5 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.4.3.5 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance usage notification subscription is not available anymore on NFVO @@ -74,7 +74,7 @@ GET Information about an individual subscription - NOT FOUND ... Test title: GET Information about an individual subscription - NOT FOUND ... Test objective: The objective is to test that the retrieval of individual NS instance usage notification subscription fails when using an invalid resource identifier. ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. - ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL011/NSInstanceUsageNotification-API/NotificationEndpoint.robot b/SOL011/NSInstanceUsageNotification-API/NotificationEndpoint.robot index 28bb3cce7..65c1e98a1 100644 --- a/SOL011/NSInstanceUsageNotification-API/NotificationEndpoint.robot +++ b/SOL011/NSInstanceUsageNotification-API/NotificationEndpoint.robot @@ -13,7 +13,7 @@ NS Instance Usage Notification ... Test title: NS Instance Usage Notification ... Test objective: The objective is to test that NS Instance Usage Notification is delivered with success to the notification consumer ... Pre-conditions: A subscription for instance usage notification is available in the NFVO. - ... Reference: Clause 8.5.5.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.5.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none diff --git a/SOL011/NSInstanceUsageNotification-API/Notifications.robot b/SOL011/NSInstanceUsageNotification-API/Notifications.robot index a299608dc..d9e25466f 100644 --- a/SOL011/NSInstanceUsageNotification-API/Notifications.robot +++ b/SOL011/NSInstanceUsageNotification-API/Notifications.robot @@ -13,7 +13,7 @@ NS Instance Usage START Notification ... Test title: NS Instance Usage START Notification ... Test objective: The objective is to test the dispatch of NS Instance Usage Start Notification when the usage of an NS instance is started, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A subscription for NS instance usage notification is available in the NFVO. - ... Reference: Clause 8.5.5.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.5.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -27,7 +27,7 @@ NS Instance Usage END Notification ... Test title: NS Instance Usage END Notification ... Test objective: The objective is to test the dispatch of NS Instance Usage End Notification when the usage of an NS instance is ended, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A subscription for NS instance usage notification is available in the NFVO. - ... Reference: Clause 8.5.5.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.5.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot index 36d4389e6..0fb07861e 100644 --- a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot +++ b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot @@ -12,7 +12,7 @@ POST Create a new subscription ... Test title: POST Create a new subscription ... Test objective: The objective is to test that POST method creates a subscription ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: Subscription is created in the NFVO @@ -28,7 +28,7 @@ POST Create a new Subscription - DUPLICATION ... Test title: POST Create a new subscription - DUPLICATION ... Test objective: The objective is to test that POST method creates a duplicate subscription ... Pre-conditions: A subscription shall already exist - ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: Duplication supported by NFVO-C ... Post-Conditions: Duplicate subscription is created in the NFVO @@ -44,7 +44,7 @@ POST Create a new Subscription - NO-DUPLICATION ... Test title: POST Create a new subscription - NO-DUPLICATION ... Test objective: The objective is to test that POST method cannot create a duplicate subscription ... Pre-conditions: A subscription shall already exist - ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: Duplication NOT supported by NFVO-C ... Post-Conditions: Duplicate subscription is not created in the NFVO @@ -58,7 +58,7 @@ GET Subscriptions ... Test title: GET Subscriptions ... Test objective: The objective is to test that GET method retrieves the list of existing subscriptions ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -71,7 +71,7 @@ GET Subscription - Filter ... Test title: GET Subscription - Filter ... Test objective: The objective is GET the list of active subscriptions using a filter ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -84,7 +84,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is GET the list of active subscriptions using an invalid filter ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -97,7 +97,7 @@ GET subscriptions - Bad Request Response too Big ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective: The objective is test that the retrieval of active subscriptions list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -110,7 +110,7 @@ GET subscriptions with "all_fields" attribute selector ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "all_fields" attribute selector ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -123,7 +123,7 @@ GET subscriptions with "exclude_default" attribute selector ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_default"s attribute selector ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -136,7 +136,7 @@ GET subscriptions with "fields" attribute selector ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "fields" attribute selector ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -149,7 +149,7 @@ GET subscriptions with "exclude_fields" attribute selector ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_fields" attribute selector ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -162,7 +162,7 @@ GET Subscriptions as Paged Response ... Test title: GET Subscriptions as Paged Response ... Test objective: The objective is to test that GET method retrieve the list of existing subscriptions as paged response. ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -175,7 +175,7 @@ PUT subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a NS instance usage subscription ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.3 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.3 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -187,7 +187,7 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a NS instance usage subscription ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.4 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.4 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -199,7 +199,7 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method cannot delete a NS instance usage subscription ... Pre-conditions: none - ... Reference: Clause 8.5.3.3.5 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.5 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: Subscriptions are not deleted @@ -212,7 +212,7 @@ GET subscriptions with "exclude_default" and "fields" attribute selector ... Test title: GET subscriptions with "exclude_default" and "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_default" and "fields" attribute selector ... Pre-conditions: - ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.4.1 + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none -- GitLab From 71ad7865f53c04b12a717e547cf4dea028b410be Mon Sep 17 00:00:00 2001 From: "mudassar.sabeel" Date: Thu, 12 Sep 2024 14:50:06 +0500 Subject: [PATCH 2/3] implement OAuth scope test for NSInstanceUsageNotification API of SOL011 --- .../IndividualSubscription.robot | 24 +++++++++ .../NSInstanceUsageNotificationKeywords.robot | 49 ++++++++++++++++++- .../Subscriptions.robot | 29 ++++++++++- .../environment/variables.txt | 4 ++ 4 files changed, 104 insertions(+), 2 deletions(-) diff --git a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot index 08ccd509b..e02784f2b 100644 --- a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot +++ b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot @@ -80,4 +80,28 @@ GET Information about an individual subscription - NOT FOUND ... Post-Conditions: none GET Individual subscription Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails +GET Information about an individual subscription with permitter authorization scope - Successful + [Documentation] Test ID: 9.3.2.2.7 + ... Test title: GET Information about an individual subscription with permitter authorization scope - Successful + ... Test objective: The objective is to test the retrieval of NS instance usage notification subscription and perform a JSON schema validation of the returned subscription data structure + ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. + ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual subscription with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is subscription +GET Information about an individual subscription with not permitter authorization scope - Successful + [Documentation] Test ID: 9.3.2.2.8 + ... Test title: GET Information about an individual subscription with not permitter authorization scope - Successful + ... Test objective: The objective is to test the retrieval of NS instance usage notification subscription and perform a JSON schema validation of the returned subscription data structure + ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. + ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual subscription with not permitted authorization scope + Check HTTP Response Status Code Is 403 Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot index 87ccabc70..cc1a04fcb 100644 --- a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot +++ b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot @@ -5,6 +5,7 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Library String +Library jwt *** Keywords *** Check HTTP Response Status Code Is @@ -261,4 +262,50 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Check Postcondition Subscriptions Exist Log Checking that subscriptions exists - Get Subscriptions \ No newline at end of file + Get Subscriptions +JWT Encode + [Arguments] ${payload} ${key} ${algorithm} + ${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm}) + [Return] ${encoded} +POST subscriptions with permitted authorization scope + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scope_value}= Create Dictionary scopeValue=${SUBSCRIPTION_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${authorizationToken}"} + ${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +POST subscriptions with not permitted authorization scope + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${authorizationToken}"} + ${body}= Get File jsons/NsInstanceUsageSubscriptionRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} allow_redirects=false + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +GET Individual subscription with permitted authorization scope + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scope_value}= Create Dictionary scopeValue=${SUBSCRIPTION_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${authorizationToken}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +GET Individual subscription with not permitted authorization scope + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${authorizationToken}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot index 0fb07861e..f0363ae8d 100644 --- a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot +++ b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot @@ -218,4 +218,31 @@ GET subscriptions with "exclude_default" and "fields" attribute selector ... 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 + Check HTTP Response Body Json Schema Is subscriptions +POST Create a new subscription with permitted authorization scope + [Documentation] Test ID: 9.3.2.1.17 + ... Test title: POST Create a new subscription with permitted authorization scope + ... Test objective: The objective is to test that POST method creates a subscription + ... Pre-conditions: none + ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Subscription is created in the NFVO + POST subscriptions with permitted authorization scope + Check HTTP Response Status Code Is 201 + 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 with NOT permitted authorization scope + [Documentation] Test ID: 9.3.2.1.18 + ... Test title: POST Create a new subscription with not permitted authorization scope + ... Test objective: The objective is to test that POST method creates a subscription + ... Pre-conditions: none + ... Reference: Clause 8.5.3.3.1 - ETSI GS NFV-SOL 011 [8] v4.5.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Subscription is created in the NFVO + POST subscriptions with not permitted authorization scope + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL011/NSInstanceUsageNotification-API/environment/variables.txt b/SOL011/NSInstanceUsageNotification-API/environment/variables.txt index b9ab0f0f1..5ccf61726 100644 --- a/SOL011/NSInstanceUsageNotification-API/environment/variables.txt +++ b/SOL011/NSInstanceUsageNotification-API/environment/variables.txt @@ -24,6 +24,10 @@ ${VNFM_SCHEMA} https ${CONTENT_TYPE_PATCH} application/merge-patch+json ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX +${SUBSCRIPTION_SCOPE} nsiun:v1:all +${NEG_SCOPE} nsiun:v1:invalid +${OAUTH_Encryption_ALGORITHM} HS256 + ${vnfInstanceDescription} description vnf ${vnfInstanceDescription_Update} Updated description vnf ${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT -- GitLab From ad256ef120d14a24097123353244adf8b889504b Mon Sep 17 00:00:00 2001 From: Umair Zafar Date: Thu, 12 Sep 2024 12:59:20 +0000 Subject: [PATCH 3/3] add editorial changes of spelling mistakes in the IndividualSubscription.robot file --- .../IndividualSubscription.robot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot index e02784f2b..f5ddf660e 100644 --- a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot +++ b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot @@ -81,9 +81,9 @@ GET Information about an individual subscription - NOT FOUND GET Individual subscription Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails -GET Information about an individual subscription with permitter authorization scope - Successful +GET Information about an individual subscription with permitted authorization scope - Successful [Documentation] Test ID: 9.3.2.2.7 - ... Test title: GET Information about an individual subscription with permitter authorization scope - Successful + ... Test title: GET Information about an individual subscription with permitted authorization scope - Successful ... Test objective: The objective is to test the retrieval of NS instance usage notification subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 @@ -93,9 +93,9 @@ GET Information about an individual subscription with permitter authorization sc GET Individual subscription with permitted authorization scope Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is subscription -GET Information about an individual subscription with not permitter authorization scope - Successful +GET Information about an individual subscription with not permitted authorization scope - Successful [Documentation] Test ID: 9.3.2.2.8 - ... Test title: GET Information about an individual subscription with not permitter authorization scope - Successful + ... Test title: GET Information about an individual subscription with not permitted authorization scope - Successful ... Test objective: The objective is to test the retrieval of NS instance usage notification subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [8] v4.5.1 @@ -104,4 +104,4 @@ GET Information about an individual subscription with not permitter authorizatio ... Post-Conditions: none GET Individual subscription with not permitted authorization scope Check HTTP Response Status Code Is 403 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails -- GitLab