Skip to content

Commit cba054c

Browse files
authored
chore: Updates mongodbatlas_advanced_cluster tests to expect temporary SERVICE_UNAVAILABLE error when migrating from old to new schema (#2523)
1 parent 13c7208 commit cba054c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

internal/service/advancedcluster/resource_advanced_cluster_migration_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package advancedcluster_test
33
import (
44
"fmt"
55
"os"
6+
"regexp"
67
"testing"
78

89
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
@@ -104,6 +105,11 @@ func TestMigAdvancedCluster_shardedMigrationFromOldToNewSchema(t *testing.T) {
104105
Config: configShardedTransitionOldToNewSchema(orgID, projectName, clusterName, false),
105106
Check: checkShardedTransitionOldToNewSchema(false),
106107
},
108+
{
109+
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
110+
Config: configShardedTransitionOldToNewSchema(orgID, projectName, clusterName, true),
111+
ExpectError: regexp.MustCompile("SERVICE_UNAVAILABLE"),
112+
},
107113
{
108114
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
109115
Config: configShardedTransitionOldToNewSchema(orgID, projectName, clusterName, true),
@@ -129,6 +135,11 @@ func TestMigAdvancedCluster_geoShardedMigrationFromOldToNewSchema(t *testing.T)
129135
Config: configGeoShardedTransitionOldToNewSchema(orgID, projectName, clusterName, false),
130136
Check: checkGeoShardedTransitionOldToNewSchema(false),
131137
},
138+
{
139+
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
140+
Config: configShardedTransitionOldToNewSchema(orgID, projectName, clusterName, true),
141+
ExpectError: regexp.MustCompile("SERVICE_UNAVAILABLE"),
142+
},
132143
{
133144
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
134145
Config: configGeoShardedTransitionOldToNewSchema(orgID, projectName, clusterName, true),

0 commit comments

Comments
 (0)