-
Notifications
You must be signed in to change notification settings - Fork 10k
Fix diagnostic comparison issues in s3
backend tests
#37509
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
Conversation
…rrors via diagnostics
…agnostics are defined in the context of the config they're triggered by
…nvalid_mode` by making `diagnosticBase` struct comparable
When I run the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Thanks for fixing these!
% TF_ACC=1 go test -count=1 ./...
ok github.com/hashicorp/terraform/internal/backend/remote-state/s3 213.818s
…ific comparer code to s3 package
I got some feedback about making Because of the potential risk affecting users seeing diagnostics, I've removed the The only reason we needed to make terraform/internal/backend/remote-state/s3/backend.go Lines 1088 to 1095 in 8b65426
If the |
I ran the s3 tests locally and they're passing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lightly changed version of the original file removed in #36385
This PR is stacked on #37508
Once this PR is merged all the S3 tests will be passing.
After diagnostic comparison became more stringent
s3
tests were failing because some diagnostics had Source data associated with them, while the expected diagnostics in the test cases did not include that information. The Source data that causes the issue appears to be added here in a backend testing helper:terraform/internal/backend/testing.go
Line 45 in 8f41cc8
To address this, I've updated relevant test cases to similarly add config contect to diagnostics in some test cases.
Target Release
N/A
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry