hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.34k stars 1.74k forks source link

Failing test(s): TestAccDataSourceGoogleKmsCryptoKeyLatestVersion_basic #20110

Open trodge opened 1 week ago

trodge commented 1 week ago

Impacted tests

Affected Resource(s)

Failure rates

Message(s)

=== RUN   TestAccDataSourceGoogleKmsCryptoKeyLatestVersion_basic
    data_source_google_kms_crypto_key_latest_version_test.go:33: Step 1/3, expected an error but got none
--- FAIL: TestAccDataSourceGoogleKmsCryptoKeyLatestVersion_basic (15.10s)
FAIL

Nightly build test history

b/377317714

wyardley commented 1 week ago

Added in #11456, and seems like it's been failing since then...

Steps 2 and 3 pass on their own. I don't see how this ever worked - the key that's created in the bootstrap step (tftest-shared-sign-key-1, I think) is already enabled when created, so the search (expected to return a "latest" key that's disabled?) succeeds where it's expected to fail. Maybe such a key exists in the project that the cloudbuild integration tests run against?

Unless the test (or something else) first ensures that there is a disabled key as latest, the later steps to ensure that the latest enabled version only is returned, it seems hard to imagine how this test could pass consistently.