mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 13:46:11 +10:00
Suppress e-mails on failed builds if allow_failure is set Every time I push to GitLab, I get > 2 emails saying a spec failed when I don't care about the benchmarks and others that have `allow_failure` set to `true`. @ayufan mentioned creating a summary e-mail to prevent getting one e-mail per build, but the latter might actually be desirable. For example, I do want to know if Rubocop errors fail right away. See merge request !2178
22 lines
690 B
Ruby
22 lines
690 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'Gitlab::BuildDataBuilder' do
|
|
let(:build) { create(:ci_build) }
|
|
|
|
describe :build do
|
|
let(:data) do
|
|
Gitlab::BuildDataBuilder.build(build)
|
|
end
|
|
|
|
it { expect(data).to be_a(Hash) }
|
|
it { expect(data[:ref]).to eq(build.ref) }
|
|
it { expect(data[:sha]).to eq(build.sha) }
|
|
it { expect(data[:tag]).to eq(build.tag) }
|
|
it { expect(data[:build_id]).to eq(build.id) }
|
|
it { expect(data[:build_status]).to eq(build.status) }
|
|
it { expect(data[:build_allow_failure]).to eq(false) }
|
|
it { expect(data[:project_id]).to eq(build.project.id) }
|
|
it { expect(data[:project_name]).to eq(build.project.name_with_namespace) }
|
|
end
|
|
end
|