Add tests around how plugin framework provider configuration code handles scopes values#8874
Conversation
… by inaccessible functions
…ig struct after `LoadAndValidateFramework` runs
…ing test case that fails
…ata model, so mutations to the data within the function change the original struct This enables tests to track how the data is mutated
…` now taking a pointer as an argument
…oviderConfig` struct definition
…t, make field be populated with data
|
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. Terraform GA: Diff ( 6 files changed, 511 insertions(+), 33 deletions(-)) |
Tests analyticsTotal tests:
|
|
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. Terraform GA: Diff ( 3 files changed, 104 insertions(+), 22 deletions(-)) |
Tests analyticsTotal tests:
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Breaking Change Detection FailedThe breaking change detector crashed during execution. This is usually due to the downstream provider(s) failing to compile. Please investigate or follow up with your reviewer. Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 3 files changed, 105 insertions(+), 23 deletions(-)) |
|
☝️ Problem due to a change lost when addressing merge conflicts |
| var defaultClientScopes = []string{ | ||
| "https://www.googleapis.com/auth/cloud-platform", | ||
| "https://www.googleapis.com/auth/userinfo.email", |
There was a problem hiding this comment.
This defaultClientScopes was removed because it's a duplicate of transport_tpg.DefaultClientScopes
|
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. Terraform GA: Diff ( 3 files changed, 104 insertions(+), 22 deletions(-)) |
Tests analyticsTotal tests:
|
|
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. Terraform GA: Diff ( 3 files changed, 104 insertions(+), 22 deletions(-)) |
Tests analyticsTotal tests:
|
…dles `scopes` values (GoogleCloudPlatform#8874) * Add initial version of plugin framework provider config test affected by inaccessible functions * Refactor provider config tests to use plugin-framework types * Add test case about handling of Unknown values for `project` * Update tests to check values in BOTH the data model and provider config struct after `LoadAndValidateFramework` runs * Add some tests for `credentials` in plugin framework provider, including test case that fails * Update `LoadAndValidateFramework` to take a pointer to the provider data model, so mutations to the data within the function change the original struct This enables tests to track how the data is mutated * Add remaining `credentials` test cases to check PF/SDK config parity * Make tests unset ADC ENV automatically, update comments to tests setting ADC ENV * Add test for behaviour when credentials value is unknown * Add comment referring devs to where unknown value test is implemented * Remove duplicated test case * Fix filename so it's generated correctly * Remove fmt line * Update `project` tests that are affected by `LoadAndValidateFramework` now taking a pointer as an argument * Remove duplication of `defaultClientScopes` info, format `FrameworkProviderConfig` struct definition * Update `FrameworkProviderConfig` to store scopes info using types.List, make field be populated with data * Add initial version of tests for scopes in plugin framework config code * Add remaining tests for `scopes`, update formatting of SDK version of test case * Change (FrameworkProviderConfig).UserProjectOverride to types.Bool (again)
…dles `scopes` values (GoogleCloudPlatform#8874) * Add initial version of plugin framework provider config test affected by inaccessible functions * Refactor provider config tests to use plugin-framework types * Add test case about handling of Unknown values for `project` * Update tests to check values in BOTH the data model and provider config struct after `LoadAndValidateFramework` runs * Add some tests for `credentials` in plugin framework provider, including test case that fails * Update `LoadAndValidateFramework` to take a pointer to the provider data model, so mutations to the data within the function change the original struct This enables tests to track how the data is mutated * Add remaining `credentials` test cases to check PF/SDK config parity * Make tests unset ADC ENV automatically, update comments to tests setting ADC ENV * Add test for behaviour when credentials value is unknown * Add comment referring devs to where unknown value test is implemented * Remove duplicated test case * Fix filename so it's generated correctly * Remove fmt line * Update `project` tests that are affected by `LoadAndValidateFramework` now taking a pointer as an argument * Remove duplication of `defaultClientScopes` info, format `FrameworkProviderConfig` struct definition * Update `FrameworkProviderConfig` to store scopes info using types.List, make field be populated with data * Add initial version of tests for scopes in plugin framework config code * Add remaining tests for `scopes`, update formatting of SDK version of test case * Change (FrameworkProviderConfig).UserProjectOverride to types.Bool (again)
This comment shares context about why we are adding these tests: #8818 (comment)
I recommend hiding whitespace changes when reviewing this PR!
In this PR, I:
types.Listinstead of[]stringdefaultClientScopesRelease Note Template for Downstream PRs (will be copied)