-
Notifications
You must be signed in to change notification settings - Fork 38
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
Implement a mock client #146
Comments
This would be useful! FWIW, it's easy to spin up a local test server currently in unit testing, it's just more heavyweight. |
Yes, that is what I'd like to avoid with this mock client. |
We can probably start with having the client just replay a static certificate chain and response from a test instance. A mock client could also take in a signing key and chain and run parts of https://github.com/sigstore/timestamp-authority/blob/main/pkg/api/timestamp.go#L29 |
Working on this |
This can be used to avoid spinning up server instances when running unit tests. This supports generation via request and via options. Fixes #146 Signed-off-by: Hayden Blauzvern <[email protected]>
This can be used to avoid spinning up server instances when running unit tests. This supports generation via request and via options. Fixes #146 Signed-off-by: Hayden Blauzvern <[email protected]> Signed-off-by: Hayden Blauzvern <[email protected]>
Description
We need to create a mock client where all the different API calls are supported and these functions return
valid
data for testing purposes.The text was updated successfully, but these errors were encountered: