Skip to content

Conversation

@stephybun
Copy link
Member

Related Issue

Fixes #556

Description

  • Updates the query mode in testing_new.go to handle ExpectError like other testing modes do
  • Renames the test files for contains to be a bit more explicit
  • Adds two tests for querycheck.Contains one that validates the regular non ExpectError path still works and one to validate that ExpectError works

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Nerp

@stephybun stephybun requested a review from a team as a code owner October 10, 2025 12:33
"github.com/hashicorp/terraform-plugin-testing/tfversion"
)

func dessertsThatStartWithPResource() testprovider.Resource {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are just some silly examples to allow the addition of two simple tests to validate the changes here, they are by no means complete and intentionally minimal since there's currently work in flight over in #553 to refactor and flesh out all of the remaining tests for query checks.

Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, nice examples! 🍨

@stephybun stephybun merged commit 7ed2ee2 into main Oct 13, 2025
43 checks passed
@stephybun stephybun deleted the b/query-mode-expect-error branch October 13, 2025 07:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2025
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.

ExpectError not supported for Query mode checks

2 participants