Skip to content

Fixed failing tests from param binder #1353

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

Closed
wants to merge 2 commits into from

Conversation

kolaente
Copy link
Contributor

This pr fixes the failing tests from #1165. When I removed my param binder stuff, that specific test worked again, so think I can be sure my code is the problem here.

I'm not 100% sure why this fix works or why this even failed in the first place, any ideas are appreciated.

The tests were failing because of the call to val.Field(i) in bind.go:106. When this was called and the passed ptr variable was nil this function panicked. I don't understand enough of Go's reflect mechanisms to be able to tell why exactly this was the case, so my "fix" is more a workaround for the fact that the tests are failing.

@codecov
Copy link

codecov bot commented Jun 22, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@858270f). Click here to learn what that means.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1353   +/-   ##
=========================================
  Coverage          ?   84.24%           
=========================================
  Files             ?       27           
  Lines             ?     2057           
  Branches          ?        0           
=========================================
  Hits              ?     1733           
  Misses            ?      210           
  Partials          ?      114
Impacted Files Coverage Δ
bind.go 90.16% <60%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 858270f...34000ea. Read the comment docs.

@vishr vishr closed this in 8fb7b5b Jun 27, 2019
@kolaente
Copy link
Contributor Author

@vishr Why did you close this?

@vishr
Copy link
Member

vishr commented Jun 27, 2019

@kolaente Because I fixed it in 8fb7b5b without a hack.

@kolaente
Copy link
Contributor Author

@vishr so the issue was only in the way the map with the params was created?

@vishr
Copy link
Member

vishr commented Jun 27, 2019 via email

@kolaente kolaente deleted the fix/failing-tests branch June 27, 2019 18:04
@kolaente
Copy link
Contributor Author

@vishr I see... If you say it's fine to do it like this...

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.

2 participants