-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add standalone TLS example #205
Comments
hi @gavv, could i work on this issue? i'm pretty new to open source contributing, but i'd like to attempt this. i actually have a final project for my EECS 481 class at the University of Michigan that asks us to contribute to open source. i have some past experience in Go, but i was wondering if you had any suggestions for how i can get started here? thanks! |
You're welcome! Feel free to ask questions, but please be more specific: what exactly is unclear or what problem you have. |
It seems like the tests should pretty much exactly be the example, so I am confused on what exactly needs to be changed to create tests for tls.go? but the examples in the readme look a lot less complicated so i'm just unsure where to go from here, especially in terms of creating the certificate. should i just make my own like in the example? |
Yes, tls_test.go can be pretty simple, for example just make one GET request and validate received JSON, using httpexpect. The key point is providing minimal but complete setup for TLS server + httpexpect client that uses https:// and a valid certificate. We have e2e_tls_test.go, which uses https://, but instead of using a valid certificate, it just disables TLS checks. It's OK for our tests, but is not very helpful as an example for real use cases. If you follow the link in the issue, you can find a minimal Go server and client that use hard-coded TLS certificates. I suggest to base our example on that code. Yes, I think it's a good idea to generate our own certificate (for demo purposes), but at the beginning of your work you can copy certs and keys from the linked code, and change it later when everything else is working. |
ok sounds good, i'll start working on this then! also, i was looking around the repo and saw that there was a discord chat link, but it seems like the link is expired. could that be updated? or is there a seperate way to get help if needed (should i post questions here or somewhere else?) |
Yes, discord chat is a good place for things like that. Strange, I just tested the link in incognito, and it worked for me. Also some people have recently joined via that link. Could you maybe send a screenshot with error you're getting? |
i actually figured it out, but thank you! i think it was a problem on my side, but i'm in the server now :) thanks! |
@antara-gandhi Hi, do you still have plans on this? |
Unassigning, so that someone could pick it up |
@gavv If its still available, I can work on it. |
Sure, thanks! |
Hello @gavv , I´m tryng to enter in this world of open source and I think that this issue could be a good start. It still open ? |
@yoktoJH Hi, are you working on the issue? |
Yea, it should be done by the end of the week. Sorry for no updates. |
I'm sorry, I wasn't able to finish it today. I had a few issues generating new certificates, but hopefully tomorrow is the day. |
Add new example to
_examples
directory (say,tls.go
andtls_test.go
) that runs small TLS server with hardcoded certificates and tests it using httpexpect. Example can be based on https://go.googlesource.com/go/+/dev.boringcrypto/src/crypto/tls/example_test.goAdd link to new example to README: https://github.com/gavv/httpexpect#examples
The text was updated successfully, but these errors were encountered: