Skip to content
Snippets Groups Projects
Commit f5c55148 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Added new tests to Test Suite related with Events. Also the order of each...

Added new tests to Test Suite related with Events. Also the order of each information are refactorized
parent 7f1b84ca
No related branches found
No related tags found
1 merge request!8Ocf doc4 upgrade documentation with new tests
......@@ -15,21 +15,21 @@ At this documentation you will have all information and related files and exampl
* CAPIF subscriber is pre-authorised (has valid InvokerId or apfId from CAPIF Authority)
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve {subscriberId} and {subscriptionId} from Location Header
**Information of Test**:
1. Perform [Invoker Onboarding]
2. Event Subscription:
1. Send POST to *https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions*
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body]
3. Use **Invoker Certificate**
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve {subscriberId} and {subscriptionId} from Location Header
**Expected Result**:
1. Response to Onboard request must accomplish:
......@@ -37,11 +37,11 @@ At this documentation you will have all information and related files and exampl
2. Response Body must follow **APIInvokerEnrolmentDetails** data structure with:
* apiInvokerId
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}**
2. Response to Event Subscription must accomplish:
1. **201 Created**
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: *{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: **{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}**
3. Response Body must follow **EventSubscription** data structure.
3. Event Subscriptions are stored in CAPIF Database
......@@ -59,20 +59,20 @@ At this documentation you will have all information and related files and exampl
* CAPIF subscriber is not pre-authorised (has invalid InvokerId or apfId)
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
**Information of Test**:
1. Perform [Invoker Onboarding]
2. Event Subscription:
1. Send POST to *https://{CAPIF_HOSTNAME}/capif-events/v1/{SUBSCRIBER_NOT_REGISTERED}/subscriptions*
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{SUBSCRIBER_NOT_REGISTERED}/subscriptions**
2. body [event subscription request body]
3. Use **Invoker Certificate**
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
**Expected Result**:
1. Response to Onboard request must accomplish:
......@@ -80,7 +80,7 @@ At this documentation you will have all information and related files and exampl
2. Response Body must follow **APIInvokerEnrolmentDetails** data structure with:
* apiInvokerId
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}**
2. Response to Event Subscription must accomplish:
1. **404 Not Found**
......@@ -105,26 +105,26 @@ At this documentation you will have all information and related files and exampl
* CAPIF subscriber is pre-authorised (has valid InvokerId or apfId from CAPIF Authority)
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve {subscriberId} and {subscriptionId} from Location Header
4. Remove Event Subscription
**Information of Test**:
1. Perform [Invoker Onboarding]
2. Event Subscription:
1. Send POST to *https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions*
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body]
3. Use **Invoker Certificate**
3. Remove Event Subscription:
1. Send DELETE to *https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions*
1. Send **DELETE** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. Use **Invoker Certificate**
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve {subscriberId} and {subscriptionId} from Location Header
4. Remove Event Subscription
**Expected Result**:
1. Response to Onboard request must accomplish:
......@@ -132,11 +132,11 @@ At this documentation you will have all information and related files and exampl
2. Response Body must follow **APIInvokerEnrolmentDetails** data structure with:
* apiInvokerId
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}**
2. Response to Event Subscription must accomplish:
1. **201 Created**
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: *{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: **{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}**
3. Response Body must follow **EventSubscription** data structure.
3. Event Subscriptions are stored in CAPIF Database
......@@ -159,26 +159,26 @@ At this documentation you will have all information and related files and exampl
* CAPIF subscriber is pre-authorised (has valid InvokerId or apfId).
* CAPIF subscriber is subscribed to Events.
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve Location Header with subscriptionId.
4. Remove Event Subscribed with not valid Subscriber.
**Information of Test**:
1. Perform [Invoker Onboarding]
2. Event Subscription:
1. Send POST to https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions
1. Send **POST** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions**
2. body [event subscription request body]
3. Use **Invoker Certificate**
3. Remove Event Subcription with not valid subscriber:
1. Send DELETE to to https://{CAPIF_HOSTNAME}/capif-events/v1/{SUBSCRIBER_ID_NOT_VALID}/subscriptions/{subcriptionId}
1. Send **DELETE** to **https://{CAPIF_HOSTNAME}/capif-events/v1/{SUBSCRIBER_ID_NOT_VALID}/subscriptions/{subcriptionId}**
2. Use **Invoker Certificate**
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve Location Header with subscriptionId.
4. Remove Event Subscribed with not valid Subscriber.
**Expected Result**:
1. Response to Onboard request must accomplish:
......@@ -186,7 +186,7 @@ At this documentation you will have all information and related files and exampl
2. Response Body must follow **APIInvokerEnrolmentDetails** data structure with:
* apiInvokerId
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}**
2. Response to Event Subscription must accomplish:
1. 201 Created
......@@ -195,10 +195,11 @@ At this documentation you will have all information and related files and exampl
3. Event Subscriptions are stored in CAPIF Database
4. Error Response Body must accomplish with **ProblemDetails** data structure with:
* status 404
* title with message "Not Found"
* detail with message "Invoker or APF or AEF or AMF Not found".
* cause with message "Subscriber Not Found".
* status 404
* title with message "Not Found"
* detail with message "Invoker or APF or AEF or AMF Not found".
* cause with message "Subscriber Not Found".
---
## Test Case 5: Deletes an individual CAPIF Event Subscription with invalid SubscriptionId
......@@ -214,26 +215,26 @@ At this documentation you will have all information and related files and exampl
* CAPIF subscriber is pre-authorised (has invalid InvokerId or apfId).
* CAPIF subscriber is subscribed to Events.
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve Location Header with subscriptionId.
4. Remove Event Subscribed with not valid Subscriber.
**Information of Test**:
1. Perform [Invoker Onboarding]
2. Event Subscription:
1. Send POST to https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions
1. Send **POST** to https://{CAPIF_HOSTNAME}/capif-events/v1/{subscriberId}/subscriptions
2. body [event subscription request body]
3. Use **Invoker Certificate**
3. Remove Event Subcription with not valid subscriber:
1. Send DELETE to to https://{CAPIF_HOSTNAME}/capif-events/v1/{subcriberId}/subscriptions/{SUBSCRIPTION_ID_NOT_VALID}
1. Send **DELETE** to to https://{CAPIF_HOSTNAME}/capif-events/v1/{subcriberId}/subscriptions/{SUBSCRIPTION_ID_NOT_VALID}
2. Use **Invoker Certificate**
**Execution Steps**:
1. Register Invoker and Onboard Invoker at CCF
2. Subscribe to Events
3. Retrieve Location Header with subscriptionId.
4. Remove Event Subscribed with not valid Subscriber.
**Expected Result**:
1. Response to Onboard request must accomplish:
......@@ -241,11 +242,11 @@ At this documentation you will have all information and related files and exampl
2. Response Body must follow **APIInvokerEnrolmentDetails** data structure with:
* apiInvokerId
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}**
2. Response to Event Subscription must accomplish:
1. **201 Created**
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: *{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}
2. The URI of the created resource shall be returned in the "Location" HTTP header, following this structure: **{apiRoot}/capif-events/{apiVersion}/{subscriberId}/subscriptions/{subscriptionId}**
3. Response Body must follow **EventSubscription** data structure.
3. Event Subscriptions are stored in CAPIF Database
......@@ -273,6 +274,15 @@ At this documentation you will have all information and related files and exampl
* **Mock Server is up and running to receive requests.**
* **Mock Server is clean.**
**Execution Steps**:
1. Register provider and publish one API at CCF
2. Register Invoker and Onboard Invoker at CCF
3. Discover published APIs and extract apiIds and apiNames
4. Subscribe to **SERVICE_API_INVOCATION_SUCCESS** and **SERVICE_API_INVOCATION_FAILURE** event filtering by aefId.
5. Retrieve {subscriberId} and {subscriptionId} from Location Header
6. Emulate Success and Failure on API invocation of provider by Invoker, using Invocation Logs API.
**Information of Test**:
1. Perform [provider registration]
......@@ -305,15 +315,6 @@ At this documentation you will have all information and related files and exampl
5. 200 and 400 results in two logs.
3. Use AEF Certificate
**Execution Steps**:
1. Register provider and publish one API at CCF
2. Register Invoker and Onboard Invoker at CCF
3. Discover published APIs and extract apiIds and apiNames
4. Subscribe to **SERVICE_API_INVOCATION_SUCCESS** and **SERVICE_API_INVOCATION_FAILURE** event filtering by aefId.
5. Retrieve {subscriberId} and {subscriptionId} from Location Header
6. Emulate Success and Failure on API invocation of provider by Invoker, using Invocation Logs API.
**Expected Result**:
1. Response to Event Subscription must accomplish:
......@@ -385,7 +386,7 @@ At this documentation you will have all information and related files and exampl
* Use **APF Certificate**
7. Remove published Service API at CCF:
* Send DELETE to resource URL **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis/{SERVICE_API_ID}**
* Send **DELETE** to resource URL **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis/{SERVICE_API_ID}**
* Use **APF Certificate**
......@@ -453,7 +454,7 @@ At this documentation you will have all information and related files and exampl
7. Update published API at CCF:
* Send **PUT** to resource URL **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId}/service-apis/{serivceApiId}**
* body [service api description] with overrided *apiName* to *service_1_modified*
* body [service api description] with overrided **apiName** to **service_1_modified**
* Use **APF Certificate**
**Expected Result**:
......@@ -506,7 +507,7 @@ At this documentation you will have all information and related files and exampl
3. Use **Provider AMF Certificate**
4. Perform [invoker onboarding]
5. Update information of previously onboarded Invoker:
* Send *PUT* to **https://{CAPIF_HOSTNAME}/api-invoker-management/v1/onboardedInvokers/{onboardingId}**
* Send **PUT** to **https://{CAPIF_HOSTNAME}/api-invoker-management/v1/onboardedInvokers/{onboardingId}**
* Reference Request Body is: [put invoker onboarding body]
* "notificationDestination": "**http://host.docker.internal:8086/netapp_new_callback**",
6. Offboard:
......@@ -523,7 +524,7 @@ At this documentation you will have all information and related files and exampl
2. Response Body must follow **APIInvokerEnrolmentDetails** data structure with:
* apiInvokerId
* onboardingInformation->apiInvokerCertificate must contain the public key signed.
3. Response Header **Location** must be received with URI to new resource created, following this structure: *{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}*
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}**
3. Response to Update Request (PUT) with minor change must contain:
1. **200 OK** response.
2. notificationDestination on response must contain the new value
......@@ -576,11 +577,11 @@ At this documentation you will have all information and related files and exampl
3. Use **Provider AMF Certificate**
5. Discover published APIs
6. Create Security Context for Invoker
* Send PUT **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* body [service security body]
* Use Invoker Certificate
7. Provider Retrieve ACL
* Send GET **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}**
* Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}**
* Use **serviceApiId** and **aefId**
* Use AEF Provider Certificate
......@@ -646,15 +647,15 @@ At this documentation you will have all information and related files and exampl
3. Use **Invoker Certificate**
5. Discover published APIs
6. Create Security Context for Invoker
* Send PUT **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* body [service security body]
* Use Invoker Certificate
7. Provider Retrieve ACL
* Send GET **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}**
* Send **GET** **https://{CAPIF_HOSTNAME}/access-control-policy/v1/accessControlPolicyList/${serviceApiId}?aef-id=${aef_id}**
* Use **serviceApiId** and **aefId**
* Use **AEF Provider Certificate**
3. Delete Security Context of Invoker by Provider:
* Send DELETE **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* Send **DELETE** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* Use **AEF certificate**
**Expected Result**:
......@@ -719,11 +720,11 @@ At this documentation you will have all information and related files and exampl
3. Use **Invoker Certificate**
5. Discover published APIs
6. Create Security Context for Invoker
* Send PUT **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* Send **PUT** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}**
* body [service security body]
* Use Invoker Certificate
7. Revoke Authorization by Provider:
* Send POST **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}/delete**
* Send **POST** **https://{CAPIF_HOSTNAME}/trustedInvokers/{apiInvokerId}/delete**
* body [security notification body]
* Using AEF Certificate.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment