From 5655ed6cb9606065040c161eeae36a6404813a9a Mon Sep 17 00:00:00 2001 From: Jorge Moratinos Salcines <jorge.moratinossalcines@telefonica.com> Date: Tue, 3 Dec 2024 09:48:40 +0100 Subject: [PATCH] supported default examples set to 0 and new tests 14 at publish test suite --- .../service_api_description_post_example.json | 2 +- .../event_subscription.json | 2 +- .../invoker_details_post_example.json | 2 +- .../invoker_details_put_example.json | 6 +- .../testplan/api_publish_service/README.md | 77 ++++++++++++++++++- .../service_api_description_post_example.json | 2 +- .../service_security.json | 2 +- 7 files changed, 84 insertions(+), 9 deletions(-) diff --git a/doc/testing/testplan/api_access_control_policy/service_api_description_post_example.json b/doc/testing/testplan/api_access_control_policy/service_api_description_post_example.json index b725b42..10022ce 100644 --- a/doc/testing/testplan/api_access_control_policy/service_api_description_post_example.json +++ b/doc/testing/testplan/api_access_control_policy/service_api_description_post_example.json @@ -95,7 +95,7 @@ } ], "description": "string", - "supportedFeatures": "fffff", + "supportedFeatures": "0", "shareableInfo": { "isShareable": true, "capifProvDoms": [ diff --git a/doc/testing/testplan/api_events_service/event_subscription.json b/doc/testing/testplan/api_events_service/event_subscription.json index 40dc09b..6614530 100644 --- a/doc/testing/testplan/api_events_service/event_subscription.json +++ b/doc/testing/testplan/api_events_service/event_subscription.json @@ -23,7 +23,7 @@ "events": ["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], "notificationDestination": "http://robot.testing", "requestTestNotification": true, - "supportedFeatures": "aaa", + "supportedFeatures": "0", "websockNotifConfig": { "requestWebsocketUri": true, "websocketUri": "websocketUri" diff --git a/doc/testing/testplan/api_invoker_management/invoker_details_post_example.json b/doc/testing/testplan/api_invoker_management/invoker_details_post_example.json index c306a17..8eb7514 100644 --- a/doc/testing/testplan/api_invoker_management/invoker_details_post_example.json +++ b/doc/testing/testplan/api_invoker_management/invoker_details_post_example.json @@ -1,6 +1,6 @@ { "notificationDestination": "http://host.docker.internal:8086/netapp_callback", - "supportedFeatures": "fffffff", + "supportedFeatures": "0", "apiInvokerInformation": "ROBOT_TESTING_INVOKER", "websockNotifConfig": { "requestWebsocketUri": true, diff --git a/doc/testing/testplan/api_invoker_management/invoker_details_put_example.json b/doc/testing/testplan/api_invoker_management/invoker_details_put_example.json index 37a1eef..e96aa03 100644 --- a/doc/testing/testplan/api_invoker_management/invoker_details_put_example.json +++ b/doc/testing/testplan/api_invoker_management/invoker_details_put_example.json @@ -1,6 +1,6 @@ { "notificationDestination": "http://host.docker.internal:8086/netapp_new_callback", - "supportedFeatures": "fffffff", + "supportedFeatures": "0", "apiInvokerInformation": "ROBOT_TESTING_INVOKER", "websockNotifConfig": { "requestWebsocketUri": true, @@ -21,7 +21,7 @@ "capifProvDoms": ["capifProvDoms", "capifProvDoms"], "isShareable": true }, - "supportedFeatures": "fffffff", + "supportedFeatures": "0", "description": "description", "apiSuppFeats": "fffffff", "apiId": "apiId", @@ -209,7 +209,7 @@ "capifProvDoms": ["capifProvDoms", "capifProvDoms"], "isShareable": true }, - "supportedFeatures": "fffffff", + "supportedFeatures": "0", "description": "description", "apiSuppFeats": "fffffff", "apiId": "apiId", diff --git a/doc/testing/testplan/api_publish_service/README.md b/doc/testing/testplan/api_publish_service/README.md index 928c95e..86b8c67 100644 --- a/doc/testing/testplan/api_publish_service/README.md +++ b/doc/testing/testplan/api_publish_service/README.md @@ -606,7 +606,7 @@ At this documentation you will have all information and related files and exampl ## Test Case 13: Delete APIs Published by NON Authorised apfId -**Test ID**: ***capif_api_publish_service-12*** +**Test ID**: ***capif_api_publish_service-13*** **Description**: @@ -646,6 +646,81 @@ At this documentation you will have all information and related files and exampl * detail with message "User not authorized". * cause with message "Certificate not authorized". +## Test Case 14: Check Two Published APIs with different APFs are removed when Provider is deleted + +**Test ID**: ***capif_api_publish_service-13*** + +**Description**: + + This test case will check that a Provider registered with two APFs, with one API published with each APF are removed properly when provider is removed. + +**Pre-Conditions**: + + * CAPIF subscriber is pre-authorised (has valid apfId from CAPIF Authority). + +**Execution Steps**: + + 1. Register Provider with 2 APFs at CCF and store certificates. + 2. Publish **service_1** API with **APF_1** + 3. Publish **service_2** API with **APF_2** + 4. Retrieve APIs published by **APF_1** + 5. Retrieve APIs published by **APF_2** + 6. Remove Provider by **AMF** + +**Information of Test**: + + 1. Perform [Provider Registration] and [Invoker Onboarding] + + 2. Publish **service_1** Service API at CCF: + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId1}/service-apis** + * body [service api description] with apiName **service_1** + * Get apiId + * Use **APF_1 Certificate** + 3. Publish **service_2** Service API at CCF: + * Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId2}/service-apis** + * body [service api description] with apiName **service_2** + * Get apiId + * Use **APF_2 Certificate** + 4. Retrieve all published APIs by **APF_1**: + * Send **GET** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId1}/service-apis** + * Use **APF_1 Certificate** + 5. Retrieve all published APIs by **APF_2**: + * Send **GET** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId2}/service-apis** + * Use **APF_2 Certificate** + 6. Get Number of services published by superadmin: + 1. Store value obtained in **services_present_on_ccf_after_publish** + 7. Delete registered provider: + * Send **DELETE** **https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{registrationId}** + * Use AMF Certificate. + 8. Get Number of services published by superadmin: + 1. Store value obtained in **services_present_on_ccf_after_delete_provider** + + +**Expected Result**: + + 1. Response to Publish request must accomplish: + 1. **201 Created** + 2. Response Body must follow **ServiceAPIDescription** data structure with: + * apiId + 1. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/published-apis/v1/{apfId1}/service-apis/{serviceApiId}** + 2. Response to Publish request must accomplish: + 1. **201 Created** + 2. Response Body must follow **ServiceAPIDescription** data structure with: + * apiId + 3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/published-apis/v1/{apfId2}/service-apis/{serviceApiId}** + 3. Response to Retrieve all published APIs by **APF_1**: + 1. **200 OK** + 2. Response body must return an array of **ServiceAPIDescription** data. + 3. Array must contain all previously published APIs by **APF_1**. + 4. Response to Retrieve all published APIs by **APF_2**: + 1. **200 OK** + 2. Response body must return an array of **ServiceAPIDescription** data. + 3. Array must contain all previously published APIs by **APF_2**. + 5. Delete Provider: + 1. **204 No Content** response. + 6. Check two APIs where removed after remove provider: + 1. **services_present_on_ccf_after_publish** - **services_present_on_ccf_after_delete_provider** = 2 + [service api description]: ./service_api_description_post_example.json "Service API Description Request" [publisher register body]: ./publisher_register_body.json "Publish register Body" diff --git a/doc/testing/testplan/api_publish_service/service_api_description_post_example.json b/doc/testing/testplan/api_publish_service/service_api_description_post_example.json index b725b42..10022ce 100644 --- a/doc/testing/testplan/api_publish_service/service_api_description_post_example.json +++ b/doc/testing/testplan/api_publish_service/service_api_description_post_example.json @@ -95,7 +95,7 @@ } ], "description": "string", - "supportedFeatures": "fffff", + "supportedFeatures": "0", "shareableInfo": { "isShareable": true, "capifProvDoms": [ diff --git a/doc/testing/testplan/api_security_service/service_security.json b/doc/testing/testplan/api_security_service/service_security.json index ad7bc1a..2798067 100644 --- a/doc/testing/testplan/api_security_service/service_security.json +++ b/doc/testing/testplan/api_security_service/service_security.json @@ -1,6 +1,6 @@ { "notificationDestination": "http://robot.testing", - "supportedFeatures": "fffffff", + "supportedFeatures": "0", "securityInfo": [{ "authenticationInfo": "authenticationInfo", "authorizationInfo": "authorizationInfo", -- GitLab