Skip to content
Snippets Groups Projects
Commit bfad0e4a authored by Francesco Giacomini's avatar Francesco Giacomini
Browse files

Use the x509-scripts in the helper-scripts repo

parent e63972c6
No related branches found
No related tags found
1 merge request!27Resolve "Use a throw-away CA for the tests"
......@@ -44,7 +44,7 @@ At the end of this stage, all the useful rpms are saved as job artifacts.
### 2. docker-build-rpms
In this stage we set up a docker image with nginx, the httpg patch and the `ngx_http_voms_module`. To do this, we use a set of scripts written by Andrea Ceccanti in the [`helper-scripts`](https://baltig.infn.it/mw-devel/helper-scripts.git) project.
In this stage we set up a docker image with nginx, the httpg patch and the `ngx_http_voms_module`. To do this, we use a set of scripts in the [`helper-scripts`](https://baltig.infn.it/mw-devel/helper-scripts.git) project.
The dockerfile and all the files needed for its compilation are in the `docker` directory. The image starts from AlmaLinux 9, defines a user and installs a set of useful packages. After that we import the nginx repo file, in this way we can download a lot of packages provided by nginx, including its last stable version. In the end we install the rpm packages that we build in the previous stage and the njs module.
......
......@@ -6,19 +6,19 @@ Setup and files to test the *ngx_http_voms_module* are contained in the `t` fold
### Test fixture setup
All the certificates, proxy certificates, trust-anchors directory, LSC files, etc., needed for the tests are automatically created by the `t/setup.sh` script. It uses utilities contained in the [x509-scripts](https://baltig.infn.it/giaco/x509-scripts) repo and the VOMS clients. Certificates and proxies are described in configuration files `t/openssl.conf`, `t/conf.d/*` and `t/proxies.d/*`.
All the certificates, proxy certificates, trust-anchors directory, LSC files, etc., needed for the tests are automatically created by the `t/setup.sh` script. It uses utilities contained in the [helper-scripts](https://baltig.infn.it/mw-devel/helper-scripts) repo, in particulare in the `x509-scripts` subdirectory, and the VOMS clients. Certificates and proxies are described in configuration files `t/openssl.conf`, `t/conf.d/*` and `t/proxies.d/*`.
The x509-scripts repo needs to be cloned somewhere locally and its scripts made available in the PATH:
The `helper-scripts` repo needs to be cloned somewhere locally and its X509 scripts made available in the PATH:
```shell
$ git clone https://baltig.infn.it/giaco/x509-scripts.git
$ PATH=$(pwd)/x509-scripts/scripts:$PATH
$ git clone https://baltig.infn.it/mw-devel/helper-scripts.git
$ PATH=$(pwd)/helper-scripts/x509-scripts/scripts:$PATH
```
Then, to setup, just run:
```shell
$ (cd t && ./setup.sh)
$(cd t && ./setup.sh)
```
### Running Tests
......@@ -29,7 +29,7 @@ To run the tests made available in `t` just type
$ prove
```
from `t`' s parent directory.
from `t`'s parent directory.
The `prove` command creates a directory called `servroot` in `t`, so if the `t` folder is accessible read-only, for
example in a docker container, just make a copy somewhere else and run the tests from there:
......@@ -41,6 +41,7 @@ prove
```
Note: the alert below is unavoidable, but it doesn't affect the tests.
```
[alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
```
......
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