-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Harry/scanserver #196
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
base: master
Are you sure you want to change the base?
Harry/scanserver #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is sort of complicated. why not using initca.New(request) directly? That's much easier, right?
|
Also, it appears helpers/testsuite/test_certificates.go is defining helper functions that are not utilized. Separate it for a second commit or omit it for this pull request to avoid confusion. |
helpers/testsuite/testsuite_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments or unused code?
|
Good job. Thanks. |
|
LGTM |
|
The commit message may need some cleanup though. |
|
Ah yes, sorry about that. How is that? It's a bit verbose, but I added/changed a few distinct things and had trouble summarizing. Let me know if there's something you would prefer. |
|
@hwh33 you can do multi-line commit message. The first line is the summary. And details can be itemized as "- add test servers", "- redo certificate generation" "- add tests to bundler and scan" etc. in the following lines. |
|
@lziest Oh okay, I see. I'll go ahead and change that. Thank you! |
- Add TestServer to helpers/testsuite for tests requiring a configurable, local TLS server - Remove CreateSelfSignedCert from helpers/testsuite due to overlap with initca.New - Complete re-do of SignCertificate in helpers/testsuite using internal packages (rather than parsing CLI) - Re-factor helpers/testsuite into logical distinct files for maintainability - Add tests to helpers/testsuite for TestServer - Add tests to bundler to test BundleFromRemote against local testsuite.TestServer (TLS) - Add tests to scan to test against local testsuite.TestServer (both TLS and TCP)
helpers/testsuite/servers_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok not to test this. This is causing race condition in the tests and we probably never start two servers in the functional tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lziest Okay, that makes sense. I removed the test.
- Add TestServer to helpers/testsuite for tests requiring a configurable, local TLS server - Remove CreateSelfSignedCert from helpers/testsuite due to overlap with initca.New - Complete re-do of SignCertificate in helpers/testsuite using internal packages (rather than parsing CLI) - Re-factor helpers/testsuite into logical distinct files for maintainability - Add tests to helpers/testsuite for TestServer - Add tests to bundler to test BundleFromRemote against local testsuite.TestServer (TLS) - Add tests to scan to test against local testsuite.TestServer (both TLS and TCP)
Implements a test server for the bundler and scan packages (addressing issues #117 and #96). This test server is flexible, so it should be usable for future packages as well. Also re-factors the existing CFSSL server.