Skip to content

Commit

Permalink
Removed logging, added sslmode=require
Browse files Browse the repository at this point in the history
  • Loading branch information
bhagatparwinder committed Oct 22, 2024
1 parent 3420b30 commit 1b8ee9c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/cclf-import-test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,18 @@ jobs:
FILENAME: ${{needs.trigger.outputs.filename}}
# CAUTION: if changing the script below, validate that sensitive information is not printed in the workflow
run: |
log() {
local level="$1"
shift
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*"
}
HOST=$(aws rds describe-db-instances --db-instance-identifier bcda-test-rds 2>&1 | jq -r '.DBInstances[0].Endpoint.Address' 2>&1)
CONNECTION_URL=$(echo $CONNECTION_INFO 2>&1 | sed -E "s/@.*\/bcda/\@$HOST\/bcda/" 2>&1)
# Verify that we have a record of the CCLF file in the database
CCLF_FILE=`psql -t "$CONNECTION_URL" -c "SELECT id FROM cclf_files WHERE name = '$FILENAME' LIMIT 1" 2>&1`
log "DEBUG" "CCLF File: $CCLF_FILE"
CCLF_FILE=`psql -t "$CONNECTION_URL?sslmode=require" -c "SELECT id FROM cclf_files WHERE name = '$FILENAME' LIMIT 1" 2>&1`
if [[ $? -ne 0 || -z $CCLF_FILE ]]; then
echo "cclf_file query returned zero results or command failed"
exit 1
else
# Verify that the correct number of benes were imported into the database.
CCLF_BENES=`psql -t "$CONNECTION_URL" -c "SELECT count(mbi) FROM cclf_beneficiaries WHERE file_id = $CCLF_FILE" 2>&1`
CCLF_BENES=`psql -t "$CONNECTION_URL?sslmode=require" -c "SELECT count(mbi) FROM cclf_beneficiaries WHERE file_id = $CCLF_FILE" 2>&1`
if [[ $? -ne 0 || -z $CCLF_BENES ]]; then
echo "CCLF beneficiaries query returned zero results or command failed"
exit 1
Expand Down

0 comments on commit 1b8ee9c

Please sign in to comment.