Skip to content

Fetch support_bot though organization in specs

What does this MR do and why?

This code change updates how the system handles "support bot" users across multiple test files. Previously, the code was creating a single global support bot user, but now it creates organization-specific support bots by calling Users::Internal.for_organization(organization_id).support_bot instead of just Users::Internal.support_bot.

The changes also reorganize some test setup code by moving group creation to happen before support bot creation (since the bot now needs to know which organization it belongs to), and consolidates some test setup blocks to be more efficient. This appears to be part of a larger effort to make the application support multiple organizations, where each organization has its own support bot rather than sharing a single global one.

This is part 2/3 of MRs to change the way we fetch support bot

  • The first one, removed all specs where we didn't need to define the support bot. : !205685 (merged)
  • The third one, we update all the code and it coresponding specs to fetch the support_bot though the organization, !205350

References

#565281

How to set up and validate locally

As this is only test changes, all tests should pass.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stefanos Xanthopoulos

Merge request reports

Loading