h2non / gock

HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

Home Page:https://pkg.go.dev/github.com/h2non/gock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSL/TLS mocked responses

rcaught opened this issue · comments

Great package @h2non. Thanks for making it.

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

commented

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.

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.