diff --git a/ee/lib/audit/compliance_framework_changes_auditor.rb b/ee/lib/audit/compliance_framework_changes_auditor.rb index a9d7a6d06b6241593f3db7db8633aea3938108ad..81aa8bd4cd2fea5bcb01cb072cc69455697ccef5 100644 --- a/ee/lib/audit/compliance_framework_changes_auditor.rb +++ b/ee/lib/audit/compliance_framework_changes_auditor.rb @@ -22,7 +22,8 @@ def execute ::Gitlab::Audit::Auditor.audit(audit_context) else - audit_changes(:framework_id, as: 'compliance framework', model: model, entity: @project) + audit_changes(:framework_id, as: 'compliance framework', model: model, entity: @project, + event_type: 'compliance_framework_id_updated') end end diff --git a/ee/spec/lib/audit/compliance_framework_changes_auditor_spec.rb b/ee/spec/lib/audit/compliance_framework_changes_auditor_spec.rb index bc9c36cd56f0557e662bf4cb9ae2cdbe05e81abb..a37adbf8a451bd30ee539c446a9a7c00431e7685 100644 --- a/ee/spec/lib/audit/compliance_framework_changes_auditor_spec.rb +++ b/ee/spec/lib/audit/compliance_framework_changes_auditor_spec.rb @@ -32,6 +32,13 @@ to: 'GDPR' }) end + + it 'streams correct audit event stream' do + expect(AuditEvents::AuditEventStreamingWorker).to receive(:perform_async).with( + 'compliance_framework_id_updated', anything, anything) + + subject.execute + end end end