Skip to content
Snippets Groups Projects

Integrate listing of existing custom headers into custom headers form for streaming audit events

All threads resolved!
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -17,10 +17,10 @@
@@ -17,10 +17,10 @@
shared_examples 'exception logging' do
shared_examples 'exception logging' do
it 'logs error' do
it 'logs error' do
expect(Gitlab::AppLogger).to receive(:error).with(
expect(Gitlab::AppLogger).to receive(:error).with({
'open_api.http_code' => api_exception.code,
'open_api.http_code' => api_exception.code,
'open_api.response_body' => api_exception.response_body.truncate(100)
'open_api.response_body' => api_exception.response_body.truncate(100)
)
})
subject
subject
end
end
@@ -66,11 +66,11 @@
@@ -66,11 +66,11 @@
.and_return(error)
.and_return(error)
allow(open_api).to receive(:list_events)
allow(open_api).to receive(:list_events)
.with(project.id, error.fingerprint, sort: 'occurred_at_asc', limit: 1)
.with(project.id, error.fingerprint, { sort: 'occurred_at_asc', limit: 1 })
.and_return(list_events_asc)
.and_return(list_events_asc)
allow(open_api).to receive(:list_events)
allow(open_api).to receive(:list_events)
.with(project.id, error.fingerprint, sort: 'occurred_at_desc', limit: 1)
.with(project.id, error.fingerprint, { sort: 'occurred_at_desc', limit: 1 })
.and_return(list_events_desc)
.and_return(list_events_desc)
end
end
end
end
Loading