diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b974510d..ab8f359fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 ./... diff --git a/vault/resource_database_secret_backend_static_role_test.go b/vault/resource_database_secret_backend_static_role_test.go index fddb137bf..5fb8377bd 100644 --- a/vault/resource_database_secret_backend_static_role_test.go +++ b/vault/resource_database_secret_backend_static_role_test.go @@ -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" @@ -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() {