Commit 5655ed6c authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

supported default examples set to 0 and new tests 14 at publish test suite

parent ad1fb15a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@
    }
  ],
  "description": "string",
  "supportedFeatures": "fffff",
  "supportedFeatures": "0",
  "shareableInfo": {
    "isShareable": true,
    "capifProvDoms": [
+1 −1
Original line number Diff line number Diff line
@@ -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"
+1 −1
Original line number Diff line number Diff line
{
  "notificationDestination": "http://host.docker.internal:8086/netapp_callback",
  "supportedFeatures": "fffffff",
  "supportedFeatures": "0",
  "apiInvokerInformation": "ROBOT_TESTING_INVOKER",
  "websockNotifConfig": {
    "requestWebsocketUri": true,
+3 −3
Original line number Diff line number Diff line
{
  "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",
+76 −1
Original line number Diff line number Diff line
@@ -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"
Loading