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

Add test for URL resource #1

Open
dzeban opened this issue Jul 24, 2020 · 0 comments
Open

Add test for URL resource #1

dzeban opened this issue Jul 24, 2020 · 0 comments

Comments

@dzeban
Copy link
Contributor

dzeban commented Jul 24, 2020

There are tests that check printing from the file. We also need to test that cert is able to print certificate chain from the given URL. The trick is to make it work in isolation so querying some domain is not an option - test must work without internet and also certificate for domain will be replaced sometime and golden output should be changed every 3 months or so.

So the idea is to spin up TLS server in one goroutine and query it from test. Because TLS server is local only self-signed certificate can be used. But this certificate couldn't be verified because cert uses system CA certs pool. So this test will require adding option to cert to use CA cert from file.

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

No branches or pull requests

1 participant