From 30539244ae0f44d886534937fb7dca29ebdc262c Mon Sep 17 00:00:00 2001 From: Matthew Baggett <matthew@baggett.me> Date: Fri, 21 Jun 2024 16:28:15 +0200 Subject: [PATCH] Fixup --- .github/workflows/docker.validate.yml | 2 +- .github/workflows/tests.yml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.validate.yml b/.github/workflows/docker.validate.yml index 9855777..fd2789e 100644 --- a/.github/workflows/docker.validate.yml +++ b/.github/workflows/docker.validate.yml @@ -13,7 +13,7 @@ on: - completed env: - CANDIDATE_IMAGE: ghcr.io/${{ github.repository }}:hash-${{ github.sha }} + CANDIDATE_IMAGE: ghcr.io/${{ github.repository }}:sha-${{ github.sha }} jobs: validate-install-report: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ab1e11d..790466c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,39 +20,53 @@ jobs: - name: Give it a moment... run: sleep 5 - name: No-SSL Connect to Web A + shell: bash run: | + set -xeu docker compose exec test-box curl -s -D - http://a.example.org > a.nossl.http grep "HTTP/1.1 200 OK" a.nossl.http; grep "<h1>Website A</h1>" a.nossl.http; - name: SSL Connect to Web A + shell: bash run: | + set -xeu docker compose exec test-box curl -s -k -D - https://a.example.org 2>&1 > a.ssl.http; grep "HTTP/1.1 200 OK" a.ssl.http; grep "<h1>Website A</h1>" a.ssl.http; - name: No-SSL Connect to Web B + shell: bash run: | + set -xeu docker compose exec test-box curl -s -D - http://b.example.org 2>&1 > b.nossl.http grep "HTTP/1.1 200 OK" b.nossl.http grep "<h1>Website B</h1>" b.nossl.http - name: SSL Connect to Web B + shell: bash run: | + set -xeu docker compose exec test-box curl -s -k -D - https://b.example.org 2>&1 > b.ssl.http grep "HTTP/1.1 200 OK" b.ssl.http grep "<h1>Website B</h1>" b.ssl.http - name: No-SSL Connect to SSL-redirect + shell: bash run: | + set -xeu docker compose exec test-box curl -s -D - http://redirect-to-ssl.example.org 2>&1 > redirect.nossl.http # Validate its redirected grep "HTTP/1.1 301 Moved Permanently" redirect.nossl.http # And going to the right place grep "Location: https://redirect-to-ssl.example.org" redirect.nossl.http - name: SSL Connect to SSL-redirect + shell: bash run: | + set -xeu docker compose exec test-box curl -s -k -D - https://redirect-to-ssl.example.org 2>&1 > redirect.ssl.http grep "HTTP/1.1 200 OK" redirect.ssl.http grep "<h1>Website redirect-to-ssl</h1>" redirect.ssl.http - name: Connect to Plural multiple times and verify it loadbalances + shell: bash run: | + set -xeu rm -f plural_requests for i in {1..20}; do docker compose exec test-box curl -s -k https://plural.example.org 2>&1 >> plural_requests