Skip to content

Commit

Permalink
add debug for test
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm committed Oct 16, 2024
1 parent 748c156 commit 3bf037a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,4 @@ jobs:
LDAP_URL: "ldap://openldap:1389"
VAULT_PLUGIN_COMMAND: ${{ steps.plugin.outputs.command }}
run: |
if [[ ${{ matrix.image }} =~ "-ent" ]]; then
target="testacc-ent"
else
target="testacc"
fi
make $target TESTARGS='-test.v' SKIP_MSSQL_MULTI_CI=true SKIP_RAFT_TESTS=true SKIP_VAULT_NEXT_TESTS=true TF_ACC_K8S_SKIP_IN_CLUSTER=true
- name: "Generate Vault API Path Coverage Report"
run: |
go run cmd/coverage/main.go -openapi-doc=./testdata/openapi.json
TF_ACC=1 go test -v -run TestAccDatabaseSecretBackendStaticRole_Rootless ./vault/... -timeout 30m ./...
6 changes: 5 additions & 1 deletion vault/resource_database_secret_backend_static_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"context"
"database/sql"
"fmt"
"github.com/hashicorp/terraform-provider-vault/internal/consts"
"os"
"testing"

"github.com/hashicorp/terraform-provider-vault/internal/consts"

_ "github.com/go-sql-driver/mysql"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand Down Expand Up @@ -164,13 +165,16 @@ CREATE ROLE "{{name}}" WITH
`

cleanup, pgxURL := testutil.PrepareTestContainerSelfManaged(t)
fmt.Println("pgxURL", pgxURL)
defer cleanup()

connURL := fmt.Sprintf("postgresql://{{username}}:{{password}}@%s/postgres?sslmode=disable", pgxURL.Host)
fmt.Println("connURL ", connURL)

// create static database user
testutil.CreateTestPGUser(t, pgxURL.String(), username, "testpassword", testRoleStaticCreate)

fmt.Println(testAccDatabaseSecretBackendStaticRoleConfig_rootlessConfig(name, username, dbName, backend, connURL, "testpassword"))
resource.Test(t, resource.TestCase{
ProviderFactories: providerFactories,
PreCheck: func() {
Expand Down

0 comments on commit 3bf037a

Please sign in to comment.