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

37 lines
1.0 KiB
Markdown
Raw Normal View History

2018-03-18 12:48:34 +01:00
### letsencrypt-nginx-proxy-companion test suite
The test suite can be run locally on a Linux host.
To prepare the test setup:
```bash
git clone https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion.git
cd docker-letsencrypt-nginx-proxy-companion
test/setup/setup-local.sh --setup
```
Then build the docker image and run the tests:
```bash
2018-04-25 11:07:14 +02:00
docker build -t jrcs/letsencrypt-nginx-proxy-companion .
test/run.sh jrcs/letsencrypt-nginx-proxy-companion
2018-03-18 12:48:34 +01:00
```
You can limit the test run to specific test(s) with the `-t` flag:
```bash
2018-04-25 11:07:14 +02:00
test/run.sh -t docker_api jrcs/letsencrypt-nginx-proxy-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 `--dry-run` flag to disable the standard output capture by the test suite.
```bash
2018-04-25 11:07:14 +02:00
test/run.sh --dry-run jrcs/letsencrypt-nginx-proxy-companion
2018-03-18 12:48:34 +01:00
```
To remove the test setup:
```bash
test/setup/setup-local.sh --teardown
```