From e22f7ad7b104af4a5c31f1b74002c7bf4ebd0d40 Mon Sep 17 00:00:00 2001 From: JM Faircloth Date: Tue, 12 Nov 2024 12:00:41 -0600 Subject: [PATCH] debug host --- .github/workflows/build.yml | 8 ++++++++ .../resource_database_secret_backend_static_role_test.go | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 578038e9a..e72ebeede 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,13 @@ jobs: - 8200:8200 volumes: - ${{ github.workspace }}:/vault/plugins + postgres: + image: docker.mirror.hashicorp.services/postgres:latest + env: + POSTGRES_PASSWORD: secret + POSTGRES_DB: database + ports: + - 5432:5432 steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 @@ -115,6 +122,7 @@ jobs: MONGODB_URL: "mongodb://root:mongodb@mongo:27017/admin?ssl=false" MSSQL_URL: "sqlserver://sa:${{ secrets.MSSQL_SA_PASSWORD }}@mssql:1433" POSTGRES_URL: "postgres://postgres:secret@postgres:5432/database?sslmode=disable" + POSTGRES_URL_STATIC: "postgres://{{username}}:{{password}}@postgres:5432/database?sslmode=disable" COUCHBASE_HOST: couchbase COUCHBASE_USERNAME: Administrator COUCHBASE_PASSWORD: password diff --git a/vault/resource_database_secret_backend_static_role_test.go b/vault/resource_database_secret_backend_static_role_test.go index 910886a22..0443c99ac 100644 --- a/vault/resource_database_secret_backend_static_role_test.go +++ b/vault/resource_database_secret_backend_static_role_test.go @@ -158,9 +158,6 @@ func TestAccDatabaseSecretBackendStaticRole_rotationSchedule(t *testing.T) { // Currently only runs locally; Vault CI is unable to talk // to the PGX Docker container due to network issues. func TestAccDatabaseSecretBackendStaticRole_Rootless(t *testing.T) { - // TODO enable test to run in CI - testutil.SkipTestEnvUnset(t, "PGX_ROOTLESS_ROTATION") - backend := acctest.RandomWithPrefix("tf-test-db") username := acctest.RandomWithPrefix("user") dbName := acctest.RandomWithPrefix("db") @@ -176,6 +173,7 @@ CREATE ROLE "{{name}}" WITH cleanup, pgxURL := testutil.PrepareTestContainerSelfManaged(t) defer cleanup() + fmt.Printf("\npgxURL.Host: %s\n", pgxURL.Host) connURL := fmt.Sprintf("postgresql://{{username}}:{{password}}@%s/postgres?sslmode=disable", pgxURL.Host) // create static database user