diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-05 10:13:46 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-13 13:35:18 +0200 |
commit | 4a6dee5f1818d3acc0029a3384ee856151ad3d16 (patch) | |
tree | e14fadd427b536a84f33a6a87bedc22792cbd1d8 | |
parent | 01f37eb77bc5d0f260196a00041d6052241adb46 (diff) | |
download | gitlab-ce-4a6dee5f1818d3acc0029a3384ee856151ad3d16.tar.gz |
Optimize CI/CD build retry service specs
-rw-r--r-- | spec/services/ci/retry_build_service_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb index bbc3a8c79f5..fbb3213f42b 100644 --- a/spec/services/ci/retry_build_service_spec.rb +++ b/spec/services/ci/retry_build_service_spec.rb @@ -1,9 +1,10 @@ require 'spec_helper' describe Ci::RetryBuildService do - let(:user) { create(:user) } - let(:project) { create(:project) } - let(:pipeline) { create(:ci_pipeline, project: project) } + set(:user) { create(:user) } + set(:project) { create(:project) } + set(:pipeline) { create(:ci_pipeline, project: project) } + let(:build) { create(:ci_build, pipeline: pipeline) } let(:service) do @@ -37,7 +38,7 @@ describe Ci::RetryBuildService do :queued, :coverage, :tags, :allowed_to_fail, :on_tag, :triggered, :trace, :teardown_environment, description: 'my-job', stage: 'test', pipeline: pipeline, - auto_canceled_by: create(:ci_empty_pipeline)) do |build| + auto_canceled_by: create(:ci_empty_pipeline, project: project)) do |build| ## # TODO, workaround for FactoryGirl limitation when having both # stage (text) and stage_id (integer) columns in the table. |