Skip to content

make tofu test generate dynamic mock values#2245

Merged
ollevche merged 2 commits intomainfrom
fix-dynamically-typed-vals
Dec 4, 2024
Merged

make tofu test generate dynamic mock values#2245
ollevche merged 2 commits intomainfrom
fix-dynamically-typed-vals

Conversation

@ollevche
Copy link
Copy Markdown
Contributor

@ollevche ollevche commented Dec 4, 2024

Resolves #2223

This PR makes tofu test generate null values for dynamic type instead of immediate failure. It doesn't make sense to fail immediately and setting null makes tests more usable in general.

Target Release

1.9.0

Checklist

  • I have read the contribution guide.
  • I have not used an AI coding assistant to create this PR.
  • I have written all code in this PR myself OR I have marked all code I have not written myself (including modified code, e.g. copied from other places and then modified) with a comment indicating where it came from.
  • I (and other contributors to this PR) have not looked at the Terraform source code while implementing this PR.

Go checklist

  • I have run golangci-lint on my change and receive no errors relevant to my code.
  • I have run existing tests to ensure my code doesn't break anything.
  • I have added tests for all relevant use cases of my code, and those tests are passing.
  • I have only exported functions, variables and structs that should be used from other packages.
  • I have added meaningful comments to all exported functions, variables, and structs.

Signed-off-by: ollevche <ollevche@gmail.com>
@ollevche ollevche requested a review from a team as a code owner December 4, 2024 12:15
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 4, 2024

Reminder for the PR assignee: If this is a user-visible change, please update the changelog as part of the PR.

Signed-off-by: ollevche <ollevche@gmail.com>
@ollevche ollevche merged commit e5d26f9 into main Dec 4, 2024
@ollevche ollevche deleted the fix-dynamically-typed-vals branch December 4, 2024 14:22
ollevche added a commit that referenced this pull request Dec 4, 2024
Signed-off-by: ollevche <ollevche@gmail.com>
ollevche added a commit that referenced this pull request Dec 4, 2024
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.

tofu test error message for mock_provider not helpful

2 participants