-
Notifications
You must be signed in to change notification settings - Fork 6
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
unable to create Requests #8
Comments
Alternatively: change |
Hey @terinjokes, thanks for using the library and raising the issue. I've raised a PR to export the constructor. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to test my implementation of
AuthFunc
in isolation, however the parameters to the function include a lightweight wrapper aroundhttp.Request
where the request field is not exported nor a constructor function provided. This makes it much more complicated to test anAuthFunc
as instead of being able to call it directly in test, I must wrap it in the middleware and implement anotherhttp.Handler
to thread the Info back to my test function.Can the request field be exported, or a constructor function for
authn.Request
be created?I would like to be able to do something like:
Right now I have to do something similar to this, which is significantly less clear what is under test.
I also believe this example test has a channel bug, but I'm going to stop working on the example now. The real one became significantly more complex as a result of not being able to directly test outputs to inputs.
The text was updated successfully, but these errors were encountered: