You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tests around how plugin framework provider configuration code handles user_project_override values, fix potential bug (#8862) (#15776)
* 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
* Update `FrameworkProviderConfig` to use plugin framework types package for `UserProjectOverride` boolean
* Add plugin framework version of tests for user_project_override, update test case names in SDK version of tests
* Add `user_project_override` test case for handling of unknown value
Signed-off-by: Modular Magician <[email protected]>
provider: fixed a bug where `user_project_override` would not be not used correctly when provisioning resources implemented using the plugin framework. Currently there are no resources implemented this way, so no-one should have been impacted.
t.Fatalf("want user_project_override in the `fwmodels.ProviderModel` struct to be `%s`, but got the value `%s`", tc.ExpectedDataModelValue, data.UserProjectOverride.String())
1010
+
}
1011
+
// Checking the value passed to the config structs
t.Fatalf("want user_project_override in the `FrameworkProviderConfig` struct to be `%s`, but got the value `%s`", tc.ExpectedConfigStructValue, p.UserProjectOverride.String())
0 commit comments