Skip to content

Commit

Permalink
test(smoketest): add configuration for no configured S3 provider
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed May 21, 2024
1 parent 37cc8ee commit f9b6ad4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
12 changes: 12 additions & 0 deletions compose/s3-none.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3"
services:
cryostat:
environment:
QUARKUS_S3_ENDPOINT_OVERRIDE: http://s3:4566
QUARKUS_S3_PATH_STYLE_ACCESS: "true" # needed since compose setup does not support DNS subdomain resolution
QUARKUS_S3_AWS_REGION: us-east-1
QUARKUS_S3_AWS_CREDENTIALS_TYPE: static
QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_ACCESS_KEY_ID: unused
QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY: unused
AWS_ACCESS_KEY_ID: unused
AWS_SECRET_ACCESS_KEY: unused
16 changes: 11 additions & 5 deletions smoketest.bash
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ if [ "${USE_PROXY}" = "true" ]; then
CRYOSTAT_HTTP_PORT=8181
GRAFANA_DASHBOARD_EXT_URL=http://localhost:8080/grafana/
else
FILES+=("${DIR}/compose/no_proxy.yml" "${DIR}/compose/s3_no_proxy.yml")
FILES+=("${DIR}/compose/no_proxy.yml")
if [ "${s3}" != "none" ]; then
FILES+=("${DIR}/compose/s3_no_proxy.yml")
fi
if [ "${DEPLOY_GRAFANA}" = "true" ]; then
FILES+=("${DIR}/compose/grafana_no_proxy.yml")
fi
Expand All @@ -115,16 +118,19 @@ export GRAFANA_DASHBOARD_EXT_URL
export DATABASE_GENERATION

s3Manifest="${DIR}/compose/s3-${s3}.yml"
STORAGE_PORT="$(yq '.services.*.expose[0]' "${s3Manifest}" | grep -v null)"
export STORAGE_PORT
export PRECREATE_BUCKETS

if [ ! -f "${s3Manifest}" ]; then
echo "Unknown S3 selection: ${s3}"
display_usage
exit 2
fi
FILES+=("${s3Manifest}")
if [ "${s3}" = "none" ]; then
STORAGE_PORT="4566"
else
STORAGE_PORT="$(yq '.services.*.expose[0]' "${s3Manifest}" | grep -v null)"
fi
export STORAGE_PORT
export PRECREATE_BUCKETS

unshift() {
local -n ary=$1;
Expand Down

0 comments on commit f9b6ad4

Please sign in to comment.