Skip to content

Commit 5c0aafd

Browse files
Fix failing TestAccSqlDatabaseInstance_replica and TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig acceptance tests for Cloud SQL (#12366) (#20436)
[upstream:2ce9af1ef67b1b027781c9f22c73f982a25c425b] Signed-off-by: Modular Magician <[email protected]>
1 parent 2293d0b commit 5c0aafd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.changelog/12366.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
sql: fixed acceptance tests TestAccSqlDatabaseInstance_replica and TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig.
3+
```

google/services/sql/resource_sql_database_instance_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func TestAccSqlDatabaseInstance_replica(t *testing.T) {
432432
{
433433
Config: fmt.Sprintf(
434434
testGoogleSqlDatabaseInstance_replica, databaseID, databaseID, databaseID, "true"),
435-
ExpectError: regexp.MustCompile("Error, failed to create instance tf-test-\\d+-2: googleapi: Error 400: Invalid request: Invalid flag for instance role: Backups cannot be enabled for read replica instance.., invalid"),
435+
ExpectError: regexp.MustCompile("Error, failed to create instance tf-test-\\d+-2: googleapi: Error 400: Invalid request: Invalid flag for instance role: Backups cannot be enabled for read replica instance"),
436436
},
437437
{
438438
Config: fmt.Sprintf(
@@ -1798,7 +1798,7 @@ func TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig(t *testing.T) {
17981798
{
17991799
Config: testGoogleSqlDatabaseInstance_sqlPostgresDataCacheConfig(enterpriseInstanceName, enterpriseTier, "ENTERPRISE"),
18001800
ExpectError: regexp.MustCompile(
1801-
fmt.Sprintf("Error, failed to create instance %s: googleapi: Error 400: Invalid request: Only ENTERPRISE PLUS edition supports data cache.., invalid", enterpriseInstanceName)),
1801+
fmt.Sprintf("Error, failed to create instance %s: googleapi: Error 400: Invalid request: Only ENTERPRISE PLUS edition supports data cache", enterpriseInstanceName)),
18021802
},
18031803
},
18041804
})

0 commit comments

Comments
 (0)