Add tests for nginx.conf directives (#1)
Adds tests to make sure all the `nginx.conf` directives (the redirects and rewrites and such) are all correct. - Uses the `busted` framework - The tests are run in a Docker container by the bash script `test.sh` - Self-signed certs are generated in `Dockerfile` for all the domain names - Adds new `Makefile` commands: `test`, `image-build` and `image-rm` Reviewed-on: #1 Co-authored-by: Catalin Mititiuc <webdevcat@proton.me> Co-committed-by: Catalin Mititiuc <webdevcat@proton.me>
This commit was merged in pull request #1.
This commit is contained in:
18
Makefile
18
Makefile
@@ -1,9 +1,19 @@
|
||||
image = miti.sh
|
||||
|
||||
run:
|
||||
docker run --rm -it --init -v $(PWD):/opt/app -p 8080:8080 \
|
||||
sitegen-openresty
|
||||
docker run --rm -it --init -v $(PWD):/opt/app -p 8080:80 $(image)
|
||||
|
||||
build:
|
||||
docker run --rm -w /opt/app -v $(PWD):/opt/app sitegen-openresty sitegen
|
||||
docker run --rm -w /opt/app -v $(PWD):/opt/app $(image) sitegen
|
||||
|
||||
image-rm:
|
||||
docker image rm $(image):latest
|
||||
|
||||
image-build:
|
||||
docker build -t $(image) .
|
||||
|
||||
lint:
|
||||
docker run --rm -w /opt/app -v $(PWD):/opt/app sitegen-openresty moonc -l .
|
||||
docker run --rm -w /opt/app -v $(PWD):/opt/app $(image) moonc -l .
|
||||
|
||||
test:
|
||||
./test.sh
|
||||
|
||||
Reference in New Issue
Block a user