From 2098cd209f157ab4f05f16977ad2e31a2107f05d Mon Sep 17 00:00:00 2001 From: burnettk Date: Fri, 24 Feb 2023 16:57:53 -0500 Subject: [PATCH] fix postgres db name and comment out debug job --- .../workflows/auto-merge-dependabot-prs.yml | 20 +++++++++---------- spiffworkflow-backend/bin/recreate_db | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/auto-merge-dependabot-prs.yml b/.github/workflows/auto-merge-dependabot-prs.yml index 5d8318a5..7982c6b4 100644 --- a/.github/workflows/auto-merge-dependabot-prs.yml +++ b/.github/workflows/auto-merge-dependabot-prs.yml @@ -19,16 +19,16 @@ permissions: contents: write jobs: - # print the context for debugging in case a job gets skipped - printJob: - name: Print event - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - echo "$GITHUB_CONTEXT" + # uncomment this to print the context for debugging in case a job is getting skipped + # printJob: + # name: Print event + # runs-on: ubuntu-latest + # steps: + # - name: Dump GitHub context + # env: + # GITHUB_CONTEXT: ${{ toJson(github) }} + # run: | + # echo "$GITHUB_CONTEXT" dependabot: runs-on: ubuntu-latest diff --git a/spiffworkflow-backend/bin/recreate_db b/spiffworkflow-backend/bin/recreate_db index 8a78a9b8..dd0bf285 100755 --- a/spiffworkflow-backend/bin/recreate_db +++ b/spiffworkflow-backend/bin/recreate_db @@ -41,13 +41,13 @@ if [[ "${1:-}" == "clean" ]]; then # TODO: check to see if the db already exists and we can connect to it. also actually clean it up. # start postgres in background with one db if [[ "${SPIFFWORKFLOW_BACKEND_DATABASE_TYPE:-}" == "postgres" ]]; then - if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_testing -c "select 1"; then - docker run --name postgres-spiff -p 5432:5432 -e POSTGRES_PASSWORD=spiffworkflow_backend -e POSTGRES_USER=spiffworkflow_backend -e POSTGRES_DB=spiffworkflow_backend_testing -d postgres + if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_unit_testing -c "select 1"; then + docker run --name postgres-spiff -p 5432:5432 -e POSTGRES_PASSWORD=spiffworkflow_backend -e POSTGRES_USER=spiffworkflow_backend -e POSTGRES_DB=spiffworkflow_backend_unit_testing -d postgres sleep 4 # classy fi if ! docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_local_development -c "select 1"; then - # create other db. spiffworkflow_backend_testing came with the docker run. - docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_testing -c "create database spiffworkflow_backend_local_development;" + # create other db. spiffworkflow_backend_unit_testing came with the docker run. + docker exec -it postgres-spiff psql -U spiffworkflow_backend spiffworkflow_backend_unit_testing -c "create database spiffworkflow_backend_local_development;" fi fi elif [[ "${1:-}" == "migrate" ]]; then