Skip to content

Commit

Permalink
check health url in e2e test (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakito committed Nov 13, 2023
1 parent 26cfc1a commit f097aac
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions testdata/e2e/runTestHealth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

echo "Test /_health Health Check"

curl --show-error --silent -w "\n%{http_code}" 'http://localhost/ssw/_health'

echo
1 change: 1 addition & 0 deletions testdata/e2e/runTestKubeseal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ echo "$SEALED_SECRET" | jq -r .apiVersion | grep --quiet "bitnami.com/v1alpha1"
echo "$SEALED_SECRET" | jq -r .kind | grep --quiet "SealedSecret"
echo "$SEALED_SECRET" | jq -r .metadata.name | grep --quiet "mysecretname"
echo "$SEALED_SECRET" | jq -r .metadata.namespace | grep --quiet "mysecretnamespace"

2 changes: 0 additions & 2 deletions testdata/e2e/runTestValidate.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash
set -e

curl --version

echo "Test /api/validate should respond 200 if sealed secret is valid"

SEALED_SECRET=$(curl --silent --show-error --request POST 'http://localhost/ssw/api/kubeseal' \
Expand Down
2 changes: 2 additions & 0 deletions testdata/e2e/runTests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e

./runTestHealth.sh

if [ "${1}" != "skip-validate" ]; then
./runTestValidate.sh
else
Expand Down

0 comments on commit f097aac

Please sign in to comment.