blob: 19f5334b4b2f14e3d0ef648c748b8ccb933f35b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
shared_examples 'logs kubernetes errors' do
let(:error_hash) do
{
service: service.class.name,
app_id: application.id,
project_ids: application.cluster.project_ids,
group_ids: [],
error_code: error_code
}
end
it 'logs into kubernetes.log and Sentry' do
expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
error,
hash_including(error_hash)
)
service.execute
end
end
|