Broken master: ee/spec/lib/ee/audit/project_changes_auditor_spec.rb
As seen in https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/253615055, introduced by 6796dcf2:
From: /Users/rspeicher/Code/gitlab/gdk-ee/gitlab-ee/ee/spec/lib/ee/audit/project_changes_auditor_spec.rb @ line 49 :
44: new_namespace = create(:namespace)
45:
46: project.update!(namespace: new_namespace)
47:
48: require 'pry'; binding.pry
=> 49: expect { foo_instance.execute }.to change { SecurityEvent.count }.by(1)
50: expect(SecurityEvent.last.details[:change]).to eq 'namespace'
51: end
52:
53: it 'creates an event when the repository size limit changes' do
54: project.update!(repository_size_limit: 100)
[1] pry(#<RSpec::ExampleGroups::EEAuditProjectChangesAuditor::AuditChanges::AuditChanges>)> SecurityEvent.count
=> 0
[2] pry(#<RSpec::ExampleGroups::EEAuditProjectChangesAuditor::AuditChanges::AuditChanges>)> foo_instance.execute
=> [:merge_requests_access_level, :issues_access_level, :wiki_access_level, :snippets_access_level, :builds_access_level, :repository_access_level, :pages_access_level]
[3] pry(#<RSpec::ExampleGroups::EEAuditProjectChangesAuditor::AuditChanges::AuditChanges>)> SecurityEvent.count
=> 2
[4] pry(#<RSpec::ExampleGroups::EEAuditProjectChangesAuditor::AuditChanges::AuditChanges>)> SecurityEvent.all
=> [#<SecurityEvent:0x00007f80d24acc70
id: 4,
author_id: 5,
type: "SecurityEvent",
entity_id: 3,
entity_type: "Project",
details: {:change=>"namespace", :from=>nil, :to=>"namespace4/project3", :author_name=>"John Doe6", :target_id=>3, :target_type=>"Project", :target_details=>"namespace4/project3"},
created_at: Wed, 17 Jul 2019 16:36:44 UTC +00:00,
updated_at: Wed, 17 Jul 2019 16:36:44 UTC +00:00>,
#<SecurityEvent:0x00007f80d2473420
id: 5,
author_id: 5,
type: "SecurityEvent",
entity_id: 3,
entity_type: "Project",
details: {:change=>"pages_access_level", :from=>"Internal", :to=>"Public", :author_name=>"John Doe6", :target_id=>3, :target_type=>"Project", :target_details=>"namespace4/project3"},
created_at: Wed, 17 Jul 2019 16:36:44 UTC +00:00,
updated_at: Wed, 17 Jul 2019 16:36:44 UTC +00:00>]
cc @vshushlin