Skip to content

testing framework: allow providers to reference run blocks#34118

Merged
liamcervante merged 2 commits intomainfrom
liamcervante/tests/provider-dependencies
Nov 8, 2023
Merged

testing framework: allow providers to reference run blocks#34118
liamcervante merged 2 commits intomainfrom
liamcervante/tests/provider-dependencies

Conversation

@liamcervante
Copy link
Copy Markdown
Contributor

This PR allows provider configurations to reference run blocks inside testing files.

To make this possible, I've introduced a field in the TestSuiteRunner that tracks the providers required for each configuration that a test suite might require. This is so that we can now selectively hand providers over to each run block as required, instead of the previous approach which simply copied all the provider configurations across for every run block.

I also fixed a bug in the provider configuration logic that meant it wasn't properly raising diagnostics and giving bad error messages for problems within the provider configurations.

Fixes #34100
Fixes #34007

Target Release

1.7.0

Draft CHANGELOG entry

ENHANCEMENTS

  • terraform test: Allow referencing run blocks from provider configurations in test files.

@liamcervante liamcervante requested a review from a team October 20, 2023 15:06
@liamcervante liamcervante changed the title testing framework: allow providers to reference run block testing framework: allow providers to reference run blocks Oct 20, 2023
@liamcervante liamcervante merged commit f90d71f into main Nov 8, 2023
@liamcervante liamcervante deleted the liamcervante/tests/provider-dependencies branch November 8, 2023 08:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 8, 2023

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 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 contributions.
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 Dec 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

2 participants