-
Notifications
You must be signed in to change notification settings - Fork 290
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
Add ability to override os.Exit for fxtest #1117
Labels
Comments
sywhang
changed the title
Add ability to override os.Exit
Add ability to override os.Exit for fxtest
Sep 12, 2023
I believe this is a fair ask if we're discussing how we can override it for testing purposes. Retitled the issue to reflect that - we can add this to For more general-purpose configuration of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
We have a component test library for testing services (which use an uberfx-based library) as a blackbox. For this test framework we would like to catch all errors rather than exit the process.
As a bonus, it would be extra helpful if we had a good mechanism to test the actual error too (prior to
os.Exit(1)
being called), but understand that's a bigger scope - as long as that error is logged using the FX logger at least we can intercept that.Describe the solution you'd like
I'd love to have an ability to override the
osExit
function used, similar to what's supported internally: #792Describe alternatives you've considered
We've added our own timeouts in our test cases that developers set separately from FX timeouts. This is a recent comment that prompted me opening this ticket when it came up in a PR on our internal component test framework:
cc @CTrando
Is this a breaking change?
No
Additional context
n/a
The text was updated successfully, but these errors were encountered: