Skip to content

Commit 2d78269

Browse files
committed
Do not set deletion_protection_enabled in basic test
1 parent 1b3155a commit 2d78269

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

internal/service/dsql/cluster_test.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestAccDSQLCluster_basic(t *testing.T) {
4141
CheckDestroy: testAccCheckClusterDestroy(ctx),
4242
Steps: []resource.TestStep{
4343
{
44-
Config: testAccClusterConfig_basic(false),
44+
Config: testAccClusterConfig_basic(),
4545
Check: resource.ComposeAggregateTestCheckFunc(
4646
testAccCheckClusterExists(ctx, resourceName, &cluster),
4747
),
@@ -90,7 +90,7 @@ func TestAccDSQLCluster_disappears(t *testing.T) {
9090
CheckDestroy: testAccCheckClusterDestroy(ctx),
9191
Steps: []resource.TestStep{
9292
{
93-
Config: testAccClusterConfig_basic(false),
93+
Config: testAccClusterConfig_basic(),
9494
Check: resource.ComposeAggregateTestCheckFunc(
9595
testAccCheckClusterExists(ctx, resourceName, &cluster),
9696
acctest.CheckFrameworkResourceDisappears(ctx, acctest.Provider, tfdsql.ResourceCluster, resourceName),
@@ -116,7 +116,7 @@ func TestAccDSQLCluster_deletionProtection(t *testing.T) {
116116
CheckDestroy: testAccCheckClusterDestroy(ctx),
117117
Steps: []resource.TestStep{
118118
{
119-
Config: testAccClusterConfig_basic(true),
119+
Config: testAccClusterConfig_deletionProtection(true),
120120
Check: resource.ComposeAggregateTestCheckFunc(
121121
testAccCheckClusterExists(ctx, resourceName, &cluster),
122122
),
@@ -137,7 +137,7 @@ func TestAccDSQLCluster_deletionProtection(t *testing.T) {
137137
ImportStateVerify: true,
138138
},
139139
{
140-
Config: testAccClusterConfig_basic(false),
140+
Config: testAccClusterConfig_deletionProtection(false),
141141
Check: resource.ComposeAggregateTestCheckFunc(
142142
testAccCheckClusterExists(ctx, resourceName, &cluster),
143143
),
@@ -281,7 +281,14 @@ func testAccPreCheck(ctx context.Context, t *testing.T) {
281281
}
282282
}
283283

284-
func testAccClusterConfig_basic(deletionProtection bool) string {
284+
func testAccClusterConfig_basic() string {
285+
return `
286+
resource "aws_dsql_cluster" "test" {
287+
}
288+
`
289+
}
290+
291+
func testAccClusterConfig_deletionProtection(deletionProtection bool) string {
285292
return fmt.Sprintf(`
286293
resource "aws_dsql_cluster" "test" {
287294
deletion_protection_enabled = %[1]t

0 commit comments

Comments
 (0)