-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
feat: added subprocess test client #3655
base: main
Are you sure you want to change the base?
Conversation
Tests are failing because the redis fixture does not seem to work correctly. Tbh, added that as a best guess, so would need some help with fixing this. Alternatively, I just replace the test with a regular "does it connect and return the right thing" kind of test and ditch the SSE testing. No idea why doc generation is failing. |
cc: @litestar-org/maintainers thought? |
cd6443e
to
469a572
Compare
469a572
to
7366207
Compare
e4bc209
to
baee5d7
Compare
e61cd34
to
7a0659b
Compare
Description
This introduces new helper functions to create sync and async test clients that can be used to test SSE endpoints with infinite generators as outlined in #3654 and https://github.com/orgs/litestar-org/discussions/3547.
The litestar cli is run in a subprocess to start a web app instance with a random port. The helper function then sets up a basic sync or async client.
The test code and doc example show how this can be used to test an SSE endpoint with an infinite generator.
Overview:
subprocess_async_client
andsubprocess_sync_client
subprocess_async_client
Closes
Closes #3654