-
Notifications
You must be signed in to change notification settings - Fork 204
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
HTTPS error when using Go core package to setup hoverfly instance #1120
Comments
how do you call |
cloud.mongodb.com is being called directly by a regular Go client which also has configured the env variable
What is suprising is that if I run hoverfly through the cli using |
Hey @AgustinBettati , sorry for the radio silence, since hoverfly has its own custom CA cert as I mentioned before, your go http client need to be able to trust it, otherwise you will get the bad tls cert error. You can do something like this to load the hoverfly ca cert in pem format , and add it to a
|
Description of the bug
I have been looking into managing hoverfly from my Go tests directly. In the documentation I do not see any official mention for a Go SDK, however I did find https://pkg.go.dev/github.com/SpectoLabs/hoverfly@v1.8.0/core which seems to expose all the functionality I need.
The issue I am facing is a TLS error due to unknown certificate authority, however when running a hoverfly instance with
hoverctl
I do not face this issue and can confirm I have configured the hoverfly ca cert in my keychain following the documentation.Steps to reproduce the issue
Go code which configures the hoverfly instance using
"github.com/SpectoLabs/hoverfly/core"
Subsequent calls fail, detailed error below.
Observed result
output from verbose logs:
error from client call:
Expected result
I would expect the same behaviour as when I setup hoverfly using
hoverctl
:In this case my https requests are successfully captured.
Additional relevant information
Any inputs would be greatly appreciated, also want to confirm that using the
github.com/SpectoLabs/hoverfly/core
package is advised.The text was updated successfully, but these errors were encountered: