h2non / gock

HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
https://pkg.go.dev/github.com/h2non/gock
MIT License
2.1k stars 107 forks source link

SSL/TLS mocked responses #14

Open rcaught opened 7 years ago

rcaught commented 7 years ago

Great package @h2non. Thanks for making it.

Question: Is it possible to mock custom SSL Certs in the mocked responses?

h2non commented 7 years ago

That's not currently supported. Why would you need that?

gock does a runtime mockey patching, so no network L3, L4 or L7 are involved here, unless you explicitly enable the real networking mode.

rcaught commented 7 years ago

Makes sense.

I'm writing a tool that collects the status/health of various endpoints. One of the metrics is the health of the SSL Certificate. Was hoping to mock out different certificates of various expiration, etc.