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 acceptance tests for how provider handles request_reason argument #2878

Conversation

modular-magician
Copy link
Collaborator

This PR:

  • test how the provider behaves when provider configuration arguments come from different sources (config vs ENVs)
  • schema-level validation that's in place, e.g. handling of empty strings
    • See note below
  • use cases: how does this argument impact the providers behaviour in plan/apply
    • This cannot be tested as the X-Goog-Request-Reason header is for auditing purposes in GCP

Writing these tests made me realise that empty string validation doesn't cover request_reason, so I opened: hashicorp/terraform-provider-google#19643 . The acceptance tests are written to define the current behaviour and my expectation is that the PF schema will be update in future to add validation, make those tests fail, and the tests will be updated.

Release Note Template for Downstream PRs (will be copied)


Derived from GoogleCloudPlatform/magic-modules#11835

…nt (#11835)

[upstream:696dabbc943b9199f7b9f413d86005f502e00f75]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner October 1, 2024 09:31
@modular-magician modular-magician requested review from ScottSuarez and removed request for a team October 1, 2024 09:31
@modular-magician modular-magician merged commit a3c0eae into GoogleCloudPlatform:main Oct 1, 2024
2 checks passed
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant