1
0
docker-letsencrypt-nginx-pr.../test/README.md

37 lines
905 B
Markdown
Raw Normal View History

2021-04-04 22:58:22 +02:00
### acme-companion test suite
2018-03-18 12:48:34 +01:00
The test suite can be run locally on a Linux or macOS host.
2018-03-18 12:48:34 +01:00
To prepare the test setup:
```bash
2021-04-04 22:58:22 +02:00
git clone https://github.com/nginx-proxy/acme-companion.git
cd acme-companion
2018-03-18 12:48:34 +01:00
test/setup/setup-local.sh --setup
```
Then build the docker image and run the tests:
```bash
2021-04-04 22:58:22 +02:00
docker build -t nginxproxy/acme-companion .
test/run.sh nginxproxy/acme-companion
2018-03-18 12:48:34 +01:00
```
You can limit the test run to specific test(s) with the `-t` flag:
```bash
2021-04-04 22:58:22 +02:00
test/run.sh -t docker_api nginxproxy/acme-companion
2018-03-18 12:48:34 +01:00
```
When running the test suite, the standard output of each individual test is captured and compared to its expected-std-out.txt file. When developing or modifying a test, you can use the `-d` flag to disable the standard output capture by the test suite.
2018-03-18 12:48:34 +01:00
```bash
2021-04-04 22:58:22 +02:00
test/run.sh -d nginxproxy/acme-companion
2018-03-18 12:48:34 +01:00
```
To remove the test setup:
```bash
test/setup/setup-local.sh --teardown
```