Skip to content

Commit 8ba6bfd

Browse files
committed
Remove test coverage for #178
* Using terratest just wasn't working out - it isn't designed for testing a provider * github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource looks like the right option but I don't have the time to learn it right now.
1 parent c884a81 commit 8ba6bfd

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

postgresql/resource_postgresql_grant_test.go

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"strings"
88
"testing"
99

10-
"github.com/gruntwork-io/terratest/modules/logger"
11-
terratest "github.com/gruntwork-io/terratest/modules/terraform"
1210
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1311
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1412
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
@@ -302,55 +300,6 @@ func TestCreateRevokeQuery(t *testing.T) {
302300
}
303301
}
304302

305-
// Test the fix for
306-
// https://github.com/cyrilgdn/terraform-provider-postgresql/issues/178
307-
func TestConcurrentPostgresqlGrant(t *testing.T) {
308-
var testcases = []struct {
309-
database_template string
310-
superuser bool
311-
}{
312-
{
313-
"template0",
314-
true,
315-
},
316-
{
317-
"template0",
318-
false,
319-
},
320-
{
321-
"template1",
322-
true,
323-
},
324-
{
325-
"template1",
326-
false,
327-
},
328-
}
329-
330-
for _, testCase := range testcases {
331-
testCase := testCase
332-
name := fmt.Sprintf("%s-%t", testCase.database_template, testCase.superuser)
333-
334-
t.Run(name, func(t *testing.T) {
335-
t.Logf("Starting test loop with database template: %s and superuser: %t", testCase.database_template, testCase.superuser)
336-
337-
terraformOptions := terratest.WithDefaultRetryableErrors(t, &terratest.Options{
338-
TerraformDir: "../examples/issues/178",
339-
Logger: logger.Discard,
340-
Vars: map[string]interface{}{
341-
"database_template": testCase.database_template,
342-
"superuser": testCase.superuser,
343-
},
344-
})
345-
346-
defer terratest.Destroy(t, terraformOptions)
347-
348-
terratest.InitAndApply(t, terraformOptions)
349-
})
350-
351-
}
352-
}
353-
354303
func TestAccPostgresqlGrant(t *testing.T) {
355304
skipIfNotAcc(t)
356305

0 commit comments

Comments
 (0)