Skip to content
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

Test failure | Object expected to be of type *url.Error, but was *errors.errorString #23

Closed
atc0005 opened this issue Aug 24, 2020 · 0 comments · Fixed by #25
Closed
Assignees
Labels
bug Something isn't working tests
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Aug 24, 2020

This test failure was surfaced from running go test ./... locally:

2020/08/24 04:26:11 RoundTripper returned a response & error; ignoring response
2020/08/24 04:26:11 RoundTripper returned a response & error; ignoring response
--- FAIL: TestTeamsClientSend (0.00s)
    send_test.go:106:
                Error Trace:    send_test.go:106
                Error:          Object expected to be of type *url.Error, but was *errors.errorString
                Test:           TestTeamsClientSend
FAIL
FAIL    github.com/atc0005/go-teams-notify/v2   0.010s
FAIL
@atc0005 atc0005 added bug Something isn't working tests labels Aug 24, 2020
@atc0005 atc0005 added this to the Next Release milestone Aug 24, 2020
@atc0005 atc0005 self-assigned this Aug 24, 2020
@atc0005 atc0005 changed the title Test failures Test failure | Object expected to be of type *url.Error, but was *errors.errorString Aug 24, 2020
atc0005 added a commit that referenced this issue Aug 24, 2020
Update table test to filter error result (nil or not) and
then apply errors.As() func where non-nil to handle wrapped
errors.

I'm not particularly practiced at writing tests, so there is
likely a better way to handle this.

This solves the immediate problem, but more work is needed to
account for recent changes that I introduced with prior PRs
accepted upstream (and now locally).

refs GH-23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant