forked from hashicorp/terraform-provider-google
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Firestore: Fix tests (hashicorp#9840) (hashicorp#17070)
There's a whole bunch of different constraints that have to be met for these tests to pass consistently. * Backup schedules need to be run in a project with billing enabled, and the database needs a deletion policy to ensure it is properly swept. * The default-database examples were marked as skip-test. They're valuable as examples but not really as tests - there's nothing Terraform-specific about them worth testing - and the Field tests will fail if default database creation doesn't work in Terraform * The Document tests need to run against the (default) database due to an existing bug (hashicorp#15550). So they will now create their own project and their own (default) database. * The Field examples are following the same pattern as the backup schedule examples. * The Firestore-native index example is using the inband project creation method, because then we can use the (default) database, which means we can use the Document resource (see the above-mentioned bug), which means that we don't need to use a manually-created project (because creating a Document implicitly creates its collection). * The Datastore mode Index example can't take that same approach, because it doesn't seem like the Document resource works on datastore-mode databases. So we will need to use the manually-created FIRESTORE_PROJECT_NAME project for that one, and it will need to have a Datastore mode database manually baked into it. This exercise has identified a fair number of places for improvement to the Firestore Terraform story, but as a stopgap to get the tests passing again, this will have to do. [upstream:003fa68204d7bcff11e5153364e8c6eb950155ed] Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
d9d02fd
commit 490ea79
Showing
14 changed files
with
509 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```release-note:none | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.