Skip to content

Add new E2E test of group audit event streaming

What does this MR do and why?

Adds a new E2E test of group audit event streaming

  • Replace specific mock requests with a single "catch all" request (to avoid No mock found matching the request errors like #422301 (closed))
  • Includes new selectors
  • Moves some shared code to a new helper class QA::Support::AuditEventStreamingService
  • Updates the instance event streaming test and extracts shared examples
  • Include custom event headers and event type filters in the tests (also helps avoid errors when events from previous tests are streamed after a delay)

Also:

  • Allow any Resource class to return all instances of the resource (requires implementation in subclasses)

Closes gitlab-org/quality/testcases#4103 (closed)

Tasks

How to set up and validate locally

From the qa directory:

bundle install
export QA_GITLAB_URL="http://gdk.test:3000" # Only needed if GDK is not running on http://127.0.0.1:3000
bundle exec rspec qa/specs/features/ee/browser_ui/10_govern/group/group_audit_event_streaming_spec.rb \
  qa/specs/features/ee/api/10_govern/instance_audit_event_streaming_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mark Lapierre

Merge request reports