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

unexpected success should lead to printing args #107

Closed
jku opened this issue Oct 13, 2023 · 0 comments · Fixed by #108
Closed

unexpected success should lead to printing args #107

jku opened this issue Oct 13, 2023 · 0 comments · Fixed by #108
Labels
enhancement New feature or request

Comments

@jku
Copy link
Member

jku commented Oct 13, 2023

If the client fails unexpectedly there's comprehensive debug output from SigstoreClient:

_CLIENT_ERROR_MSG = """
!!! CLIENT FAILURE !!!

Arguments: {args}
Exit code: {exitcode}

!!! STDOUT !!!
==============

{stdout}

!!! STDERR !!!
==============

{stderr}
"""

but in the case of client succeeding unexpectedly (with pytest.raises()) you only get

E       Failed: DID NOT RAISE <class 'test.client.ClientFail'>

This should really print at least the arguments (but for completeness maybe also stdout and stderr) to make it easier for client developers to reproduce.

A custom context manager like SigstoreClient.raises() might work.

@jku jku added the enhancement New feature or request label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant