Update AI chat specs to accommodate addon cut off date logic

Problem

Our tests for Chat based on the outdated logic for licensing chat, as they were inmplemented before the addon introduction. They don't take into account the cut off date after which users would require an addon. Right now the date of cutoff for .com is supposed to be hardcoded. As soon as we introduce the date in the codebase and the date will come, our tests start failing.

Example of failed pipeline with imitated cut-off date.

Why it's important

If we don't fix tests before the actual cutoff, there will be no easy solution at this point. We're risking to introduce a #master-broken situation, that people will telling stories about years after it happens.

Solution

Update chat tests to take into account the addon and cutoff date. Right now all tests are based on the logic that user should be a part of the group where a experimental features are enabled or self-hosted instance should have experimental features enabled. We should change it to take account addon.

There is already an MR that implements those fixes, which still require some additional work to be completed.

Failed jobs to fix

Unit

  • ee/spec/lib/gitlab/llm/chain/tools/issue_reader/executor_spec.rb
  • ee/spec/lib/gitlab/llm/chain/tools/commit_reader/executor_spec.rb
  • ee/spec/lib/gitlab/llm/chain/tools/epic_reader/executor_spec.rb
  • ee/spec/lib/gitlab/llm/chain/tools/merge_request_reader/executor_spec.rb
  • ee/spec/lib/gitlab/llm/chain/utils/chat_authorizer_spec.rb
  • ee/spec/finders/llm/extra_resource_finder_spec.rb
  • ee/spec/services/llm/chat_service_spec.rb
  • ee/spec/policies/group_policy_spec.rb
  • ee/spec/policies/project_policy_spec.rb

E2E

  • ee/spec/features/projects/jobs/root_cause_analysis_job_page_spec.rb
  • ee/spec/features/tanuki_bot_chat_spec.rb
  • ee/spec/features/duo_chat_spec.rb
  • ee/spec/requests/api/chat_spec.rb
  • ee/spec/requests/api/graphql/mutations/projects/chat_spec.rb

Not owned by Chat team

  • ee/spec/lib/cloud_connector/self_signed/access_data_reader_spec.rb
  • ee/spec/features/projects/security/vulnerability_details_spec.rb
  • ee/spec/features/projects/issues/user_creates_issue_spec.rb
Edited by Tetiana Chupryna