Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
federicaagostini committed Mar 7, 2024
1 parent 504b252 commit c84fb7e
Showing 1 changed file with 74 additions and 2 deletions.
76 changes: 74 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ A [Robot-powered][robot-framework] VOMS clients testsuite.

## Requirements

- A VOMS installation configured according to the [test fixture](./fixture/populate-vo.sh)
- A VOMS installation configured according with the [test fixture](./compose/assets/scripts/setup-and-start-voms.sh)
- `voms_vo_0` and `voms_vo_1` databases populated as per [db dump](./compose/assets/db)
- The [IGI test-ca](https://github.com/italiangrid/test-ca) package installed & trusted

## Running the testsuite

Use the `italiangrid/voms-testsuite-centos7` docker image to run the testsuite.
Use the `italiangrid/voms-testsuite` docker image to run the testsuite.

### Testsuite parameters

Expand All @@ -21,8 +22,79 @@ Use the `italiangrid/voms-testsuite-centos7` docker image to run the testsuite.
| `vo2_host` | Name of the host for the second VO | vgrid02.cnaf.infn.it |
| `vo1_issuer` | VOMS subject DN for the first VO | /DC=org/DC=terena/DC=tcs/C=IT/L=Frascati/O=Istituto Nazionale di Fisica Nucleare/OU=CNAF/CN=vgrid02.cnaf.infn.it |
| `vo2_issuer` | VOMS subject DN for the second VO | DC=org/DC=terena/DC=tcs/C=IT/L=Frascati/O=Istituto Nazionale di Fisica Nucleare/OU=CNAF/CN=vgrid02.cnaf.infn.it |
| `vo1_legacy_fqan_enabled` | Encode FQANs released by first VO as per legacy VOMS | True |
| `vo2_legacy_fqan_enabled` | Encode FQANs released by second VO as per legacy VOMS | True |

For other parameters, see the [variables file](./lib/variables.robot).


### Using docker-compose

A [docker-compose](./compose/docker-compose.ci.yml) file collecting all the necessary services can be used to run the testsuite.

#### Tests using local VOMS server

Start the trustanchor job with

```
$ cd compose
$ docker-compose --file docker-compose.ci.yml up trust
trust_1 | + FETCH_CRL_TIMEOUT_SECS=5
trust_1 | + [[ -z 1 ]]
trust_1 | + fetch-crl --verbose -T 5
trust_1 | VERBOSE(1) Initializing trust anchor AC-GRID-FR-Personnels
trust_1 | VERBOSE(1) Initializing trust anchor AC-GRID-FR-Robots
...
voms-testsuite_trust_1 exited with code 0
```

Start the db, VOMS and testsuite containers

```
$ docker-compose --file docker-compose.ci.yml up --detach db voms testsuite
```

Populate the VOMS DB with a dbdump for testing and start VOMS

```
$ docker-compose --file docker-compose.ci.yml exec -T --workdir /scripts db bash /scripts/populate-db.sh
$ docker-compose --file docker-compose.ci.yml exec -T --workdir /scripts voms bash /scripts/setup-and-start-voms.sh
```

Run the testsuite. Some variables will be overridden using the `ROBOT_OPTIONS` environment variable

```
$ export ROBOT_OPTIONS="--variable vo1:vo.0 --variable vo1_host:voms.test.example --variable vo1_issuer:/C=IT/O=IGI/CN=*.test.example --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:/C=IT/O=IGI/CN=*.test.example"
$ docker-compose --file docker-compose.ci.yml exec -T -e ROBOT_OPTIONS="${ROBOT_OPTIONS}" testsuite bash /scripts/ci-run-testsuite.sh
```

#### Tests using the VOMS-AA microservice

Start the trustanchor job with

```
$ cd compose
$ docker-compose --file docker-compose.ci.yml up trust
trust_1 | + FETCH_CRL_TIMEOUT_SECS=5
trust_1 | + [[ -z 1 ]]
trust_1 | + fetch-crl --verbose -T 5
trust_1 | VERBOSE(1) Initializing trust anchor AC-GRID-FR-Personnels
trust_1 | VERBOSE(1) Initializing trust anchor AC-GRID-FR-Robots
...
voms-testsuite_trust_1 exited with code 0
```

Start the testsuite container

```
$ docker-compose --file docker-compose.ci.yml up --detach testsuite
```

Start the testsuite. Some variables will be overridden using the `ROBOT_OPTIONS` environment variable

```
$ export ROBOT_OPTIONS="--variable vo1:test.vo --variable vo1_host:voms-dev.cloud.cnaf.infn.it --variable vo1_issuer:'/DC=org/DC=terena/DC=tcs/C=IT/ST=Roma/O=Istituto Nazionale di Fisica Nucleare/CN=voms-dev.cloud.cnaf.infn.it' --variable vo1_legacy_fqan_enabled:False --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:/C=IT/O=IGI/CN=*.test.example"
$ docker-compose --file docker-compose.ci.yml exec -T -e ROBOT_OPTIONS="${ROBOT_OPTIONS}" testsuite bash /scripts/ci-run-testsuite.sh
```

[robot-framework]: https://robotframework.org/

0 comments on commit c84fb7e

Please sign in to comment.