Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address dependency issues in TestAccFirestoreField_* tests #7046

Conversation

modular-magician
Copy link
Collaborator

Closes hashicorp/terraform-provider-google#17392

Adding an additional delay in TestAccFirestoreField_* tests to address an 100% error occurring since late Jan:

Screenshot 2024-02-09 at 16 43 41

------- Stdout: -------
=== RUN   TestAccFirestoreField_firestoreFieldUpdateAddIndexExample
=== PAUSE TestAccFirestoreField_firestoreFieldUpdateAddIndexExample
=== CONT  TestAccFirestoreField_firestoreFieldUpdateAddIndexExample
    testing_new.go:84: Error running post-test destroy, there may be dangling resources: googleapi: Error 403: Cloud Firestore API has not been used in project tf-test3abifux6ev before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/firestore.googleapis.com/overview?project=tf-test3abifux6ev then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
        Details:
        [
          {
            "@type": "type.googleapis.com/google.rpc.Help",
            "links": [
              {
                "description": "Google developers console API activation",
                "url": "https://console.developers.google.com/apis/api/firestore.googleapis.com/overview?project=tf-test3abifux6ev
              }
            ]
          },
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "domain": "googleapis.com",
            "metadata": {
              "consumer": "projects/tf-test3abifux6ev",
              "service": "firestore.googleapis.com"
            },
            "reason": "SERVICE_DISABLED"
          }
        ]
--- FAIL: TestAccFirestoreField_firestoreFieldUpdateAddIndexExample (1163.75s)
FAIL

Release Note Template for Downstream PRs (will be copied)


Derived from GoogleCloudPlatform/magic-modules#9957

* Add additional wait in TestAccFirestoreField_* tests

* Boost wait in test to 6 minutes

* Add dependency between database and service to control delete order

* Update dependency to explicitly include project

* Make firestore fields be removed from state when they're 'deleted'

* Add `destroy_duration`

* Remove from state after log line that uses id value

* Update destory check to accept a 403 as valid

* Remove unneeded changes in PR

* Remove call to SetId

[upstream:3791c34c28ff987929f1e1869c9eba723c80a095]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit d1cb9d3 into hashicorp:main Mar 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant