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

Add tests around how plugin framework provider configuration code handles region and zone values #15772

Conversation

modular-magician
Copy link
Collaborator

During this PR I identified another inconsistency between SDK and PF config code : #15714

region

  • Add test cases to match the equivalent region SDK tests
  • Ensure tests present about handling empty strings (will not be passing, add link to related issue)
  • Ensure tests present about handling Unknown values (will not be passing, add link to related issue)

zone

  • Add test cases to match match the equivalent zone SDK tests
  • Ensure tests present about handling empty strings (will not be passing, add link to related issue)
  • Ensure tests present about handling Unknown values (will not be passing, add link to related issue)

Release Note Template for Downstream PRs (will be copied)


Derived from GoogleCloudPlatform/magic-modules#8856

…dles `region` and `zone` values (hashicorp#8856)

* 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

* Improve test case names in SDK tests

* Change string values in tests - no impact on test outcome

* Add tests for plugin framework handling of `region`

* Add tests for plugin framework handling of `zone`

* Add issue link in comment

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit b0d52d2 into hashicorp:main Sep 8, 2023
4 checks passed
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant