-
-
Notifications
You must be signed in to change notification settings - Fork 580
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·31 lines (21 loc) · 748 Bytes
/
test.sh
File metadata and controls
executable file
·31 lines (21 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
source ../lib/lib.sh
export KO_DOCKER_REPO=ko.local
set -euo pipefail
# Step 1: Config validation
mint_cert haproxy-simple.test
# Combine cert and key for HAProxy SSL directory format
cat pki/haproxy-simple.test/cert.pem pki/haproxy-simple.test/key.pem >pki/haproxy-simple.test/haproxy.pem
docker run --rm \
-v $PWD/conf/haproxy:/usr/local/etc/haproxy:ro \
-v $PWD/pki:/etc/techaro/pki:ro \
haproxytech/haproxy-alpine:3.0 \
haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg
# Step 2: Runtime testing
echo "Starting services..."
docker compose up -d
sleep 5
echo "Services are healthy. Starting runtime tests..."
export NODE_TLS_REJECT_UNAUTHORIZED=0
node test.mjs
# Cleanup happens automatically via trap in lib.sh