-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.06 KB
/
e2e_test.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: End to End tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
profile: ["proxy", "proxy2"]
name: Test
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Run test server
working-directory: ./test
run: docker compose --profile ${{matrix.profile}} up --build --detach --wait --wait-timeout 60
- name: querying http returns redirect
run: |
output=$(curl -s -o /dev/null -w "%{http_code}" http://localhost)
ret="$?"
echo "$output"
if [ "$ret" -ne 0 ]; then
exit "$ret"
fi
if [ "$output" != "301" ]; then
exit 42
fi
- name: querying acme-challenge returns the key
run: |
output=$(curl -s http://localhost/.well-known/acme-challenge/abc)
ret="$?"
echo "$output"
if [ "$ret" -ne 0 ]; then
exit "$ret"
fi
if [ "$output" != "abc.MISSING_ACCOUNT_THUMBPRINT" ]; then
exit 42
fi
- name: Copy the SSL key
working-directory: ./test
run: docker compose --profile ${{matrix.profile}} cp ${{matrix.profile}}:/etc/reverse_proxy/data/certs/localhost/fullchain.pem .
- name: Querying the https route returns 200
working-directory: ./test
run: |
output=$(curl -s -o /dev/null -w "%{http_code}" --cacert fullchain.pem https://localhost)
ret="$?"
echo "$output"
if [ "$ret" -ne 0 ]; then
exit "$ret"
fi
if [ "$output" != "200" ]; then
exit 42
fi
- name: Make sure that http2 is supported
working-directory: ./test
run: |
output=$(curl -s -o /dev/null -w "%{http_version}" --cacert fullchain.pem https://localhost)
ret="$?"
echo "$output"
if [ "$ret" -ne 0 ]; then
exit "$ret"
fi
if [ "$output" != "2" ]; then
exit 42
fi