Fix nightly test failures for external credentials upgrade#17063
Fix nightly test failures for external credentials upgrade#17063shuyama1 wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 6292 Click here to see the affected service packages
Action takenFound 13 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
9aadacd to
0c3476b
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
|
/gcbrun failed during token rotation |
|
Test passed on TC |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 6294 Click here to see the affected service packages
Action takenFound 13 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
BBBmau
left a comment
There was a problem hiding this comment.
looks good, the changes make sense in the context of the plugin-testing changes introduced in 1.14.1 just a minoir quesiton on the removal of a check step
| Check: resource.ComposeTestCheckFunc( | ||
| resource.TestCheckResourceAttr("data.google_provider_config_sdk.default", "credentials", credentials), | ||
| ), | ||
| // google_provider_config_sdk is not available in 6.10.0, so we cannot verify credentials here. | ||
| // The fact that this step succeeds implies the provider accepted the credentials. |
There was a problem hiding this comment.
im not sure i follow, the first step uses the old version while also following the config apply with a checkAttribute on data.google_provider_config_sdk.default
so we should be able to leave the check step here. removing the need for testAccProviderExternalCredentialsUpgrade_CredentialsConfigNew also
There was a problem hiding this comment.
The issue is that we can't use google_provider_config_sdk datasource with the real provider. It's a test-specific data source, not publicly available testhttps://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/acctest/vcr_utils.go#L392
Therefore, need to remove it from testAccProviderExternalCredentialsUpgrade_CredentialsConfig and add the new testAccProviderExternalCredentialsUpgrade_CredentialsConfigNew to include it, so we can check that in step 4
| Check: resource.ComposeTestCheckFunc( | ||
| resource.TestCheckResourceAttr("data.google_provider_config_sdk.default", "credentials", credentials), | ||
| ), | ||
| // google_provider_config_sdk is not available in 6.10.0, so we cannot verify credentials here. |
There was a problem hiding this comment.
| // google_provider_config_sdk is not available in 6.10.0, so we cannot verify credentials here. | |
| // google_provider_config_sdk is test-specific datasource | |
| // not available in the real provider, so we cannot verify credentials here. |
fixes hashicorp/terraform-provider-google#26748
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.