Skip to content

moduletest: return backend Configure diagnostics#38682

Open
fallintoplace wants to merge 2 commits into
hashicorp:mainfrom
fallintoplace:fix/moduletest-configure-diags
Open

moduletest: return backend Configure diagnostics#38682
fallintoplace wants to merge 2 commits into
hashicorp:mainfrom
fallintoplace:fix/moduletest-configure-diags

Conversation

@fallintoplace
Copy link
Copy Markdown

What changed

This fixes the diagnostics check after getBackendInstance calls Configure for a run block backend.

The code was checking validateDiags twice, which meant a backend that passed PrepareConfig but returned errors from Configure could still be treated as successfully configured.

I also added a regression test that exercises that path with a backend stub whose Configure call returns an error.

Impact

terraform test now surfaces backend configuration failures from run block backend definitions instead of silently continuing with a backend that failed to configure.

Testing

  • go test ./internal/moduletest/states
  • go test ./internal/moduletest/...

@hashicorp-cla-app
Copy link
Copy Markdown

hashicorp-cla-app Bot commented Jun 4, 2026

CLA assistant check
All committers have signed the CLA.

@fallintoplace fallintoplace marked this pull request as ready for review June 4, 2026 16:56
@fallintoplace fallintoplace requested a review from a team as a code owner June 4, 2026 16:56
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