Skip to content

Fix CE test when linting audit event factories

Stan Hu requested to merge sh-order-dep-test-failure-audit-events into master

What does this MR do and why?

Previously if you ran this:

FOSS_ONLY=1 bundle exec rspec spec/models/audit_event_spec.rb \
    spec/support/shared_examples/lint_factories_shared_examples.rb

The shared example file hooks into whatever example groups are loading and attempts to lint them, which is why the audit event model has to run.

This would fail with NameError: uninitialized constant Gitlab::Audit::InstanceScope because instance-type audit events are only implemented in EE. To avoid this error, only define the instance_type trait in EE.

MR acceptance checklist

Please 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 Vladimir Shushlin

Merge request reports

Loading