mirror of https://github.com/ory/hydra
fix: fix benchmark test
GitOrigin-RevId: 8cd5d90c7d7124671389cafbb89b87e6c9ced34c
This commit is contained in:
parent
9023ef4d11
commit
d0e0659136
|
|
@ -207,8 +207,11 @@ func ExecNoErr(t testing.TB, cmd *cobra.Command, args ...string) string {
|
|||
|
||||
func ExecNoErrCtx(ctx context.Context, t require.TestingT, cmd *cobra.Command, args ...string) string {
|
||||
stdOut, stdErr, err := ExecCtx(ctx, cmd, nil, args...)
|
||||
require.NoError(t, err, "std_out: %s\nstd_err: %s", stdOut, stdErr)
|
||||
require.Len(t, stdErr, 0, stdOut)
|
||||
if err == nil {
|
||||
require.Len(t, stdErr, 0, "std_out: %s\nstd_err: %s", stdOut, stdErr)
|
||||
} else {
|
||||
require.ErrorIsf(t, err, context.Canceled, "std_out: %s\nstd_err: %s", stdOut, stdErr)
|
||||
}
|
||||
return stdOut
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue