Commit fee02a85 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Added new test plan and updated release notes

parent 80f0699d
Loading
Loading
Loading
Loading
+56 −13
Original line number Diff line number Diff line
@@ -12,9 +12,23 @@ To run CAPIF APIs locally using docker and docker-compose you can use run.sh scr
```
./run.sh -h

Usage: ./run.sh <options>
Usage: ./run.sh [environment] [options]

  environment         Optional. Environment name to use (e.g. dev, prod).
                      If not specified, 'dev' will be used by default.

  Options:
       -c : Setup different hostname for capif
       -m : Launch monitoring service
       -a : Setup different hostname for vault
       -R : Setup different hostname for register service
       -s : Run Mock server. Default true
       -m : Run monitoring service
       -l : Set Log Level (default DEBUG). Select one of: [CRITICAL, FATAL, ERROR, WARNING, WARN, INFO, DEBUG, NOTSET]
       -r : Remove cached information on build
       -v : Set OCF version of images
       -f : Services directory. (Default $SERVICES_DIR)
       -g : Gitlab base URL. (Default $REGISTRY_BASE_URL)
       -b : Build docker images. Default TRUE
       -h : show this help
```
This script builds and runs all services using docker images, including mongodb and nginx locally and in the background, and imports ca.crt to nginx. By default monitoring is not activated and Nginx is deployed use **capifcore** as a hostname.
@@ -53,12 +67,19 @@ NOTE: You can use different flags if you only want to stop some of them, please
```
./clean_capif_docker_services.sh -h

Usage: clean_capif_docker_services.sh <options>
       -c : clean capif services
       -v : clean vault service
       -r : clean register service
       -m : clean monitoring service
       -a : clean all services
Usage: ./clean_capif_docker_services.sh [environment] [options]

  environment         Optional. Environment name to use (e.g. dev, prod).
                      If not specified, 'dev' will be used by default.

  Options:
       -c : Clean capif services
       -v : Clean vault service
       -r : Clean register service
       -m : Clean monitoring service
       -s : Clean Robot Mock service
       -a : Clean all services
       -z : Clean images generated by docker-compose. Boolean. Default false
       -h : show this help
```

@@ -67,20 +88,24 @@ This shell script will remove and clean all CAPIF services started previously wi
On the other hand you can check logs using show_logs.sh script, please check options:

```
./show_logs.sh
You must specify an option when running the script.
Usage: ./show_logs.sh <options>
./show_logs.sh -h

Usage: ./show_logs.sh [environment] [options]

  environment         Optional. Environment name to use (e.g. dev, prod).
                      If not specified, 'dev' will be used by default."

  Options:
       -c : Show capif services
       -v : Show vault service
       -r : Show register service
       -s : Show Robot Mock Server service
       -m : Show monitoring service
       -a : Show all services
       -f : Follow log output
       -h : Show this help
```

> You can also use option -f in order to follow log output in real time

### Run All CAPIF Services locally with Docker images and deploy monitoring stack
It is now possible to deploy a monitoring stack for CAPIF with Grafana, Prometheus, FluentBit, Loki, Cadvisor, Tempo and Opentelemetry.

@@ -116,6 +141,24 @@ pip3 install -r requirements.txt
python3 -m <service>
```

### Other Local Scripts

Here there is a little explanation of each script present under services directory.
All scripts have helm, you can run ./<any_script>.sh -h to show how to use.

| Script                             | Description                                                                                          |
| :--------------------------------- | :--------------------------------------------------------------------------------------------------- |
| clean_mock_server.sh               | This script is used to undeploy local mock server.                                                   |
| create_users.sh                    | Create users at local deployment.                                                                    |
| remove_users.sh                    | Delete users at local deployment.                                                                    |
| run_capif_tests.sh                 | Run Capif tests by using robot image.                                                                |
| run_interonnection_environments.sh | Deploy locally two instances of OpenCAPIF. You must specify the envs to be used.                     |
| run_mock_server.sh                 | Deploy locally the mock server instance.                                                             |
| run.sh                             | Deploy locally an OpenCAPIF Instance.                                                                |
| show_logs.sh                       | Shows the logs of local deployed OpenCAPIF Services.                                                 |
| variables.sh                       | This script just set default values to be used by local environment. Can be overrided by envs files. |


#### Start Your Testing with OpenCAPIF

Related with OpenCAPIF Testing, the following sections help you to understand testing implemented and how to run it by yourself:
+13 −0
Original line number Diff line number Diff line
@@ -2,6 +2,16 @@

### **New Features**

#### **CAPIF Interconnection**

New developments perform to include new functionality for this release. Current work include:

- Creation of new Helper API to manage CAPIF interconnection.
- Develop initial logic to publish APIs AFTER successfull CAPIF interconnection.
- New way to read configutation yaml files inside microservices, allowing forwarding to local variables. This changes also HELM scripts at configuration map file.
- New simple test to request CAPIF interconnection at Robot tests.
- Local scripts improved in order to allow interconnection tests with local deployments.

#### **CAPIF Open Discover Service**

Added implementation of **CAPIF_Open_Discover_Service_API** to support open discovery of published APIs.
@@ -31,6 +41,9 @@ For security reasons:
- Fix the check of the Docker version in the run.sh 
- Simplify check of vendor extensibility attributes in Discover API
- Fix way to check if robot image is present to run testing scripts. (remote and local tests)
- Local scripts now support environments and multiple deployment of local instances, with 2 dev purpouses environments.
- New run_capif_interconnection_environment.sh, created to raise 2 environments locally to test capif interconnection.
- Local testing scripts now check is destination hosts are reachable by host.

#### **Allow same apiName across different AEFs**

+2 −1
Original line number Diff line number Diff line
@@ -19,4 +19,5 @@ List of Common API Services implemented:

## Helper Service

* [Visibility Control](./visibility_control/README.md)
 No newline at end of file
* [Visibility Control](./helper/visibility_control/README.md)
* [Interconnection](./helper/interconnection/README.md)
 No newline at end of file
+40 −0
Original line number Diff line number Diff line
# Test Plan for Visibility Control Feature
At this documentation you will have all information and related files and examples of test plan for this feature.

## Feature Description
The **CAPIF Interconnection** is a helper service within **OpenCAPIF**, allowing CAPIF Adminstration to manage the interconnection between OpenCAPIFs instances in order to create a OpenCAPIF Federation.

This test plan validates the lifecycle of the capif interconnection.

---

## Test Case 1: Interconnection 2 CCF

**Test ID**: `interconnection-1`

**Description**:
This test case verifies that the **Superadmin** can initiate the OpenCAPIF interconnection between instances.

**Pre-Conditions**:

* The **CAPIF** helper service is deployed and reachable.
* Superadmin credentials (`SUPERADMIN_USERNAME`) are provisioned.
* The database is in a clean state (no rules existing).

**Execution Steps**:

1. Authenticate as **Superadmin**.
2. Send a **GET** request to `{apiRoot}/helper/api/getCcfId` to obtain CCF_ID.
3. Send a **POST** request to `{apiRoot}/helper/interconnection/interconnect` with body [interconnection body]
4. Inspect the **JSON** response body.

**Expected Result**:

* **Status**: **201 OK**.

---




[interconnection body]: ./interconnection_body.json "Interconnection Body"
+3 −0
Original line number Diff line number Diff line
{
  "dstProvDom": "capif-b.org"
}
 No newline at end of file
Loading