-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Shore up multi tenant tests #4484
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR enhances multi-tenant tests by improving organization and clarity while introducing helper functions for shared setup. It also adds debugging prints that risk exposing sensitive data and may cause unintended behavior.
- /backend/tests/integration/common_utils/managers/chat.py: Added prints for headers and cookies; risk if user_performing_action is None and exposing sensitive data.
- /backend/ee/onyx/server/middleware/tenant_tracking.py: Introduced debug prints and a problematic finally block that overrides intended returns.
- /backend/tests/integration/multitenant_tests/invitation/test_user_invitation.py: Split invitation tests for better separation of roles and flows.
- /backend/tests/integration/multitenant_tests/syncing/test_search_permissions.py: Moved common tenant setup into a helper; ensure reset_multitenant isolates concurrent runs.
- /backend/tests/integration/multitenant_tests/tenants/test_tenant_creation.py: Expanded tenant creation tests; consider unique identifiers to avoid collisions.
5 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
07c8050
to
9f5a19d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits!
@@ -130,6 +128,7 @@ export function LLMProviderUpdateForm({ | |||
initialValues={initialValues} | |||
validationSchema={validationSchema} | |||
onSubmit={async (values, { setSubmitting }) => { | |||
alert("onSubmit"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover alert?
</> | ||
)} | ||
|
||
{/* NOTE: this is above the test button to make sure it's visible */} | ||
{testError && <Text className="text-error mt-2">{testError}</Text>} | ||
|
||
<div className="flex w-full mt-4"> | ||
<Button type="submit" variant="submit"> | ||
<Button | ||
onClick={() => alert(JSON.stringify(formikProps.errors))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentional alert? or no
* update * fix * finalize` * remove unnecessary prints * fix
Description
Fixes https://linear.app/danswer/issue/DAN-1770/testing-for-cloud-flows
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.