Skip to content

Refactor state_test.go#4973

Open
tessaSlice wants to merge 4 commits into
aws:devfrom
tessaSlice:dev
Open

Refactor state_test.go#4973
tessaSlice wants to merge 4 commits into
aws:devfrom
tessaSlice:dev

Conversation

@tessaSlice
Copy link
Copy Markdown

Summary

Refactored state_test.go to be table driven.

Implementation details

Consolidated all the Error Failure cases into Error.As testcases where there's a match and testcases when there's not a match.

Testing

Ran make test locally and checked that all outputs passed.

New tests cover the changes: yes

Description for the changelog

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

No

Does this PR include the addition of new environment variables in the README?

No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tessaSlice tessaSlice requested a review from a team as a code owner May 22, 2026 21:51
var err = NewErrorLookupFailure("reason")

require.True(t, errors.As(err, &target))
assert.Equal(t, err, target)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You are leaving out this pointer identity check

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.

3 participants