Skip to content

Commit 4864c09

Browse files
committed
Modify the redis update tests
1 parent 32cf829 commit 4864c09

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

mmv1/third_party/terraform/services/redis/resource_redis_cluster_test.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"time"
99

1010
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
11+
"github.com/hashicorp/terraform-plugin-testing/plancheck"
1112
"github.com/hashicorp/terraform-plugin-testing/terraform"
1213
"github.com/hashicorp/terraform-provider-google/google/acctest"
1314
"github.com/hashicorp/terraform-provider-google/google/services/redis"
@@ -1365,6 +1366,11 @@ func TestAccRedisCluster_redisClusterMaintenanceVersion(t *testing.T) {
13651366
},
13661367
{
13671368
Config: testAccRedisCluster_redisClusterMaintenanceVersionUpdate(context),
1369+
ConfigPlanChecks: resource.ConfigPlanChecks{
1370+
PreApply: []plancheck.PlanCheck{
1371+
plancheck.ExpectResourceAction("google_redis_cluster.cluster-ms", plancheck.ResourceActionUpdate),
1372+
},
1373+
},
13681374
},
13691375
{
13701376
ResourceName: "google_redis_cluster.cluster-ms",
@@ -1407,7 +1413,7 @@ resource "google_redis_cluster" "cluster-ms" {
14071413
node_type = "REDIS_SHARED_CORE_NANO"
14081414
transit_encryption_mode = "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"
14091415
authorization_mode = "AUTH_MODE_DISABLED"
1410-
# maintenance_version = "REDISCLUSTER_20251008.00_p00"
1416+
maintenance_version = "REDISCLUSTER_20251008.00_p00"
14111417
redis_configs = {
14121418
maxmemory-policy = "volatile-ttl"
14131419
}
@@ -1443,6 +1449,11 @@ func TestAccRedisCluster_redisClusterHaWithLabelsUpdate(t *testing.T) {
14431449
},
14441450
{
14451451
Config: testAccRedisCluster_redisClusterHaWithLabelsUpdate(context),
1452+
ConfigPlanChecks: resource.ConfigPlanChecks{
1453+
PreApply: []plancheck.PlanCheck{
1454+
plancheck.ExpectResourceAction("google_redis_cluster.cluster-ha-with-labels", plancheck.ResourceActionUpdate),
1455+
},
1456+
},
14461457
},
14471458
{
14481459
ResourceName: "google_redis_cluster.cluster-ha-with-labels",
@@ -1461,7 +1472,7 @@ resource "google_redis_cluster" "cluster-ha-with-labels" {
14611472
shard_count = 3
14621473
labels = {
14631474
my_key = "my_val"
1464-
other_key = "other_val"
1475+
other_key = "other_val_update"
14651476
}
14661477
psc_configs {
14671478
network = google_compute_network.consumer_net.id

0 commit comments

Comments
 (0)