Skip to content

Commit c489f09

Browse files
committed
chore: changing test fixture naming logic and moving field to a computed to fix hash drift issues
1 parent fcc3960 commit c489f09

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

provider/rediscloud_active_active_database_enable_default_user_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package provider
33
import (
44
"context"
55
"fmt"
6-
"os"
76
"strconv"
87
"testing"
98

109
"github.com/RedisLabs/rediscloud-go-api/redis"
1110
"github.com/RedisLabs/terraform-provider-rediscloud/provider/client"
1211
"github.com/RedisLabs/terraform-provider-rediscloud/provider/utils"
12+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1414
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
1515
)
@@ -28,9 +28,9 @@ import (
2828
// Step 3: global=false, all 3 regions inherit (tests REMOVAL: explicit → inherit)
2929
// Step 4: global=true, region1=explicit false, region2&3=inherit (tests ADDITION: inherit → explicit)
3030
func TestAccResourceRedisCloudActiveActiveDatabase_enableDefaultUser(t *testing.T) {
31-
subscriptionName := os.Getenv("AWS_TEST_CLOUD_ACCOUNT_NAME") + "-enable-default-user"
32-
databaseName := "tf-test-enable-default-user"
33-
databasePassword := "ThisIs!ATestPassword123"
31+
subscriptionName := acctest.RandomWithPrefix(testResourcePrefix) + "-enable-default-user"
32+
databaseName := acctest.RandomWithPrefix(testResourcePrefix) + "-database"
33+
databasePassword := acctest.RandString(20)
3434

3535
const databaseResourceName = "rediscloud_active_active_subscription_database.example"
3636

provider/resource_rediscloud_active_active_database.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ func resourceRedisCloudActiveActiveDatabase() *schema.Resource {
266266
Description: "When 'true', enables connecting to the database with the 'default' user. If not specified, the region inherits the value from global_enable_default_user.",
267267
Type: schema.TypeBool,
268268
Optional: true,
269+
Computed: true,
269270
},
270271
"remote_backup": {
271272
Description: "An object that specifies the backup options for the database in this region",

0 commit comments

Comments
 (0)