Add more integration tests

Add tests for main, app, accessory, traefik and lock commands.
Other commands are generally covered by the main tests.

Also adds some changes to speed up the integration specs:
- Use a persistent volume for the registry so we can push images to to
reuse between runs (also gets around docker hub rate limits)
- Use persistent volume for mrsk gem install, to avoid re-installing
between tests
- Shorter stop wait time
- Shorter connection timeouts on the load balancer

Takes just over 2 minutes to run all tests locally on an M1 Mac
after docker caches are primed.
This commit is contained in:
Donal McBreen
2023-04-24 14:34:46 +01:00
parent 059388cb02
commit 7cd25fd163
18 changed files with 290 additions and 76 deletions

View File

@@ -0,0 +1 @@
SECRET_TOKEN=1234

View File

@@ -1,4 +1,4 @@
FROM nginx:1-alpine-slim
FROM registry:4443/nginx:1-alpine-slim
COPY default.conf /etc/nginx/conf.d/default.conf

View File

@@ -17,3 +17,11 @@ traefik:
args:
accesslog: true
accesslog.format: json
image: registry:4443/traefik:v2.9
accessories:
busybox:
image: registry:4443/busybox:1.36.0
cmd: sh -c 'echo "Starting busybox..."; trap exit term; while true; do sleep 1; done'
roles:
- web
stop_wait_time: 1