Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix acceptance tests by adding missing var in parameter #376

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions ci/build-manifest.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ TERRAFORM="${TERRAFORM_BIN:-terraform}"

# Append environment variables to manifest
cat << EOF >> built/manifest.yml
env:
DB_URL: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_host`
DB_PORT: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_port`
S3_SNAPSHOT_BUCKET: `${TERRAFORM} output -raw -state=$STATE_FILE s3_snapshots_bucket_id`
ENABLE_FUNCTIONS: true
DB_URL: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_host`
DB_PORT: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_port`
S3_SNAPSHOT_BUCKET: `${TERRAFORM} output -raw -state=$STATE_FILE s3_snapshots_bucket_id`
ENABLE_FUNCTIONS: true
EOF

# Build secrets for merging into templates
Expand Down
5 changes: 3 additions & 2 deletions ci/run-smoke-test-rotate-creds.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cf delete-service -f "rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN"

# change into the directory and push the app without starting it.
pushd aws-db-test/databases/aws-rds
cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" -f manifest.yml --no-start
cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" --no-start

# set some variables that it needs
cf set-env "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}"
Expand All @@ -43,7 +43,7 @@ while true; do
done

# wait for the app to start. if the app starts, it's passed the smoke test.
cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}"
cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN"

# Rotate creds
cf update-service "rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" -c '{"rotate_credentials": true}'
Expand All @@ -69,6 +69,7 @@ cf restage "smoke-tests-db-rotate-creds-${SERVICE_PLAN}"
# Restart app - if it succeeds, then smoke tests have passed with new credentials
cf restart "smoke-tests-db-rotate-creds-${SERVICE_PLAN}"


# Clean up app and service
cf delete -f "smoke-tests-db-rotate-creds-$SERVICE_PLAN"
cf delete-service -f "rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN"
4 changes: 2 additions & 2 deletions ci/run-smoke-tests-db-updates.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cf delete-service -f "rds-smoke-tests-db-update-$SERVICE_PLAN"

# change into the directory and push the app without starting it.
pushd aws-db-test/databases/aws-rds
cf push "smoke-tests-db-update-${SERVICE_PLAN}" -f manifest.yml --no-start
cf push "smoke-tests-db-update-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-update-$SERVICE_PLAN" --no-start

# set some variables that it needs
cf set-env "smoke-tests-db-update-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}"
Expand All @@ -50,7 +50,7 @@ while true; do
done

# wait for the app to start. if the app starts, it's passed the smoke test.
cf push "smoke-tests-db-update-${SERVICE_PLAN}"
cf push "smoke-tests-db-update-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-update-$SERVICE_PLAN"

# Update service
cf update-service "rds-smoke-tests-db-update-$SERVICE_PLAN" -p "$NEW_SERVICE_PLAN"
Expand Down
4 changes: 2 additions & 2 deletions ci/run-smoke-tests-db-version.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cf delete-service -f "rds-smoke-tests-db-version-$SERVICE_PLAN"

# change into the directory and push the app without starting it.
pushd aws-db-test/databases/aws-rds
cf push "smoke-tests-db-version-${SERVICE_PLAN}" -f manifest.yml --no-start
cf push "smoke-tests-db-version-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-db-version-$SERVICE_PLAN" --no-start

# set some variables that it needs
cf set-env "smoke-tests-db-version-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}"
Expand All @@ -49,7 +49,7 @@ while true; do
done

# wait for the app to start. if the app starts, it's passed the smoke test.
cf push "smoke-tests-db-version-${SERVICE_PLAN}"
cf push "smoke-tests-db-version-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-version-$SERVICE_PLAN"

# Clean up app and service
cf delete -f "smoke-tests-db-version-$SERVICE_PLAN"
Expand Down
4 changes: 2 additions & 2 deletions ci/run-smoke-tests-update-storage.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cf delete-service -f "rds-smoke-tests-db-update-storage-$SERVICE_PLAN"

# change into the directory and push the app without starting it.
pushd aws-db-test/databases/aws-rds
cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" -f manifest.yml --no-start
cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-db-update-storage-$SERVICE_PLAN" --no-start

# set some variables that it needs
cf set-env "smoke-tests-db-update-storage-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}"
Expand All @@ -50,7 +50,7 @@ while true; do
done

# wait for the app to start. if the app starts, it's passed the smoke test.
cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}"
cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-update-storage-$SERVICE_PLAN"

# Update storage size
cf update-service "rds-smoke-tests-db-update-storage-$SERVICE_PLAN" -c '{"storage": 25}'
Expand Down
4 changes: 2 additions & 2 deletions ci/run-smoke-tests.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cf delete-service -f "rds-smoke-tests-$SERVICE_PLAN"

# change into the directory and push the app without starting it.
pushd aws-db-test/databases/aws-rds
cf push "smoke-tests-${SERVICE_PLAN}" -f manifest.yml --no-start
cf push "smoke-tests-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-$SERVICE_PLAN" --no-start

# set some variables that it needs
cf set-env "smoke-tests-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}"
Expand All @@ -37,7 +37,7 @@ while true; do
done

# wait for the app to start. if the app starts, it's passed the smoke test.
cf push "smoke-tests-${SERVICE_PLAN}"
cf push "smoke-tests-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-$SERVICE_PLAN"

# Clean up app and service
cf delete -f "smoke-tests-$SERVICE_PLAN"
Expand Down