Skip to content

Commit

Permalink
Fix deletion protection enabled flag test
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamAvasthi committed Dec 15, 2022
1 parent e5c4a45 commit 8566755
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,11 @@ func TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled(t *testing.T)
Config: fmt.Sprintf(
testGoogleSqlDatabaseInstance_settings_deletionProtectionEnabled, databaseName, "true"),
Destroy: true,
ExpectError: regexp.MustCompile("The instance is protected. Please disable the deletion protection and try again. To disable deletion protection, update the instance settings with deletionProtectionEnabled set to false."),
ExpectError: regexp.MustCompile(fmt.Sprintf("Error, failed to delete instance %s: googleapi: Error 400: The instance is protected. Please disable the deletion protection and try again. To disable deletion protection, update the instance settings with deletionProtectionEnabled set to false.", databaseName)),
},
{
Config: fmt.Sprintf(
testGoogleSqlDatabaseInstance_settings_deletionProtectionEnabled, databaseName, "false"),
ExpectNonEmptyPlan: true,
},
{
ResourceName: "google_sql_database_instance.instance",
Expand Down

0 comments on commit 8566755

Please sign in to comment.