From 1f1f5707244bcf4e69ef0fbe01f93e59386d5087 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 30 May 2017 12:48:05 +0200 Subject: Implement CI/CD config attributes for persisted stages --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'spec/lib') diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index fe2c00bb2ca..f98da1916b4 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -1,7 +1,8 @@ require 'spec_helper' module Ci - describe GitlabCiYamlProcessor, lib: true do + describe GitlabCiYamlProcessor, :lib do + subject { described_class.new(config, path) } let(:path) { 'path' } describe 'our current .gitlab-ci.yml' do @@ -82,6 +83,44 @@ module Ci end end + describe '#stages_for_ref' do + context 'when no refs policy is specified' do + let(:config) do + YAML.dump(production: { stage: 'deploy', script: 'cap prod' }, + rspec: { stage: 'test', script: 'rspec' }, + spinach: { stage: 'test', script: 'spinach' }) + end + + it 'returns model attributes for stages with nested jobs' do + attributes = subject.stages_for_ref('master') + + expect(attributes.size).to eq 2 + expect(attributes.dig(0, :name)).to eq 'test' + expect(attributes.dig(1, :name)).to eq 'deploy' + expect(attributes.dig(0, :builds_attributes, 0, :name)).to eq 'rspec' + expect(attributes.dig(0, :builds_attributes, 1, :name)).to eq 'spinach' + expect(attributes.dig(1, :builds_attributes, 0, :name)).to eq 'production' + end + end + + context 'when refs policy is specified' do + let(:config) do + YAML.dump(production: { stage: 'deploy', script: 'cap prod', only: ['master'] }, + spinach: { stage: 'test', script: 'spinach', only: ['tags'] }) + end + + it 'returns stage attributes except of jobs assigned to master' do + # true flag argument means matching jobs for tags + # + attributes = subject.stages_for_ref('feature', true) + + expect(attributes.size).to eq 1 + expect(attributes.dig(0, :name)).to eq 'test' + expect(attributes.dig(0, :builds_attributes, 0, :name)).to eq 'spinach' + end + end + end + describe "#builds_for_ref" do let(:type) { 'test' } -- cgit v1.2.1 From 805715cc68aabb6992a63356ec7c19940f52c93a Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 30 May 2017 15:30:45 +0200 Subject: Add stage seed class that represents attributes --- spec/lib/gitlab/ci/stage/seed_spec.rb | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 spec/lib/gitlab/ci/stage/seed_spec.rb (limited to 'spec/lib') diff --git a/spec/lib/gitlab/ci/stage/seed_spec.rb b/spec/lib/gitlab/ci/stage/seed_spec.rb new file mode 100644 index 00000000000..a12093b2c7c --- /dev/null +++ b/spec/lib/gitlab/ci/stage/seed_spec.rb @@ -0,0 +1,47 @@ +require 'spec_helper' + +describe Gitlab::Ci::Stage::Seed do + subject do + described_class.new(name: 'test', builds: builds) + end + + let(:builds) do + [{ name: 'rspec' }, { name: 'spinach' }] + end + + describe '#pipeline=' do + let(:pipeline) do + create(:ci_empty_pipeline, ref: 'feature', tag: true) + end + + it 'assignes relevant pipeline attributes' do + trigger_request = pipeline.trigger_requests.first + + subject.pipeline = pipeline + + expect(subject.builds).to all(include(pipeline: pipeline)) + expect(subject.builds).to all(include(project: pipeline.project)) + expect(subject.builds).to all(include(ref: 'feature')) + expect(subject.builds).to all(include(tag: true)) + expect(subject.builds).to all(include(trigger_request: trigger_request)) + end + end + + describe '#user=' do + let(:user) { create(:user) } + + it 'assignes relevant pipeline attributes' do + subject.user = user + + expect(subject.builds).to all(include(user: user)) + end + end + + describe '#to_attributes' do + it 'exposes stage attributes with nested jobs' do + expect(subject.to_attributes).to be_a Hash + expect(subject.to_attributes).to include(name: 'test') + expect(subject.to_attributes).to include(builds_attributes: builds) + end + end +end -- cgit v1.2.1 From c881425b665b9c0b022dc2e213486aecc320ec7e Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 31 May 2017 14:40:50 +0200 Subject: Refine pipeline stages seeds class --- spec/lib/gitlab/ci/stage/seed_spec.rb | 47 -------------------------- spec/lib/gitlab/ci/stage/seeds_spec.rb | 62 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 47 deletions(-) delete mode 100644 spec/lib/gitlab/ci/stage/seed_spec.rb create mode 100644 spec/lib/gitlab/ci/stage/seeds_spec.rb (limited to 'spec/lib') diff --git a/spec/lib/gitlab/ci/stage/seed_spec.rb b/spec/lib/gitlab/ci/stage/seed_spec.rb deleted file mode 100644 index a12093b2c7c..00000000000 --- a/spec/lib/gitlab/ci/stage/seed_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'spec_helper' - -describe Gitlab::Ci::Stage::Seed do - subject do - described_class.new(name: 'test', builds: builds) - end - - let(:builds) do - [{ name: 'rspec' }, { name: 'spinach' }] - end - - describe '#pipeline=' do - let(:pipeline) do - create(:ci_empty_pipeline, ref: 'feature', tag: true) - end - - it 'assignes relevant pipeline attributes' do - trigger_request = pipeline.trigger_requests.first - - subject.pipeline = pipeline - - expect(subject.builds).to all(include(pipeline: pipeline)) - expect(subject.builds).to all(include(project: pipeline.project)) - expect(subject.builds).to all(include(ref: 'feature')) - expect(subject.builds).to all(include(tag: true)) - expect(subject.builds).to all(include(trigger_request: trigger_request)) - end - end - - describe '#user=' do - let(:user) { create(:user) } - - it 'assignes relevant pipeline attributes' do - subject.user = user - - expect(subject.builds).to all(include(user: user)) - end - end - - describe '#to_attributes' do - it 'exposes stage attributes with nested jobs' do - expect(subject.to_attributes).to be_a Hash - expect(subject.to_attributes).to include(name: 'test') - expect(subject.to_attributes).to include(builds_attributes: builds) - end - end -end diff --git a/spec/lib/gitlab/ci/stage/seeds_spec.rb b/spec/lib/gitlab/ci/stage/seeds_spec.rb new file mode 100644 index 00000000000..cc4f37d236e --- /dev/null +++ b/spec/lib/gitlab/ci/stage/seeds_spec.rb @@ -0,0 +1,62 @@ +require 'spec_helper' + +describe Gitlab::Ci::Stage::Seeds do + before do + subject.append_stage('test', [{ name: 'rspec' }, { name: 'spinach' }]) + subject.append_stage('deploy', [{ name: 'prod', script: 'cap deploy' }]) + end + + describe '#stages' do + it 'returns hashes of all stages' do + expect(subject.stages.size).to eq 2 + expect(subject.stages).to all(be_a Hash) + end + end + + describe '#jobs' do + it 'returns all jobs in all stages' do + expect(subject.jobs.size).to eq 3 + end + end + + describe '#pipeline=' do + let(:pipeline) do + create(:ci_empty_pipeline, ref: 'feature', tag: true) + end + + it 'assignes relevant pipeline attributes' do + trigger_request = pipeline.trigger_requests.first + + subject.pipeline = pipeline + + expect(subject.stages).to all(include(pipeline: pipeline)) + expect(subject.stages).to all(include(project: pipeline.project)) + expect(subject.jobs).to all(include(pipeline: pipeline)) + expect(subject.jobs).to all(include(project: pipeline.project)) + expect(subject.jobs).to all(include(ref: 'feature')) + expect(subject.jobs).to all(include(tag: true)) + expect(subject.jobs).to all(include(trigger_request: trigger_request)) + end + end + + describe '#user=' do + let(:user) { create(:user) } + + it 'assignes relevant pipeline attributes' do + subject.user = user + + expect(subject.jobs).to all(include(user: user)) + end + end + + describe '#to_attributes' do + it 'exposes stage attributes with nested jobs' do + attributes = [{ name: 'test', builds_attributes: + [{ name: 'rspec' }, { name: 'spinach' }] }, + { name: 'deploy', builds_attributes: + [{ name: 'prod', script: 'cap deploy' }] }] + + expect(subject.to_attributes).to eq attributes + end + end +end -- cgit v1.2.1 From c72e21fd9764845a107005562ff8ce1c06cac431 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 31 May 2017 15:13:40 +0200 Subject: Return stage seeds object from YAML processor --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 30 +++++++++++++--------------- spec/lib/gitlab/ci/stage/seeds_spec.rb | 4 ++++ 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'spec/lib') diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index f98da1916b4..7f652c17ed5 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -83,7 +83,7 @@ module Ci end end - describe '#stages_for_ref' do + describe '#stage_seeds' do context 'when no refs policy is specified' do let(:config) do YAML.dump(production: { stage: 'deploy', script: 'cap prod' }, @@ -91,15 +91,15 @@ module Ci spinach: { stage: 'test', script: 'spinach' }) end - it 'returns model attributes for stages with nested jobs' do - attributes = subject.stages_for_ref('master') + it 'returns correctly fabricated stage seeds object' do + seeds = subject.stage_seeds(ref: 'master') - expect(attributes.size).to eq 2 - expect(attributes.dig(0, :name)).to eq 'test' - expect(attributes.dig(1, :name)).to eq 'deploy' - expect(attributes.dig(0, :builds_attributes, 0, :name)).to eq 'rspec' - expect(attributes.dig(0, :builds_attributes, 1, :name)).to eq 'spinach' - expect(attributes.dig(1, :builds_attributes, 0, :name)).to eq 'production' + expect(seeds.stages.size).to eq 2 + expect(seeds.stages.dig(0, :name)).to eq 'test' + expect(seeds.stages.dig(1, :name)).to eq 'deploy' + expect(seeds.jobs.dig(0, :name)).to eq 'rspec' + expect(seeds.jobs.dig(1, :name)).to eq 'spinach' + expect(seeds.jobs.dig(2, :name)).to eq 'production' end end @@ -109,14 +109,12 @@ module Ci spinach: { stage: 'test', script: 'spinach', only: ['tags'] }) end - it 'returns stage attributes except of jobs assigned to master' do - # true flag argument means matching jobs for tags - # - attributes = subject.stages_for_ref('feature', true) + it 'returns stage seeds only assigned to master to master' do + seeds = subject.stage_seeds(ref: 'feature', tag: true) - expect(attributes.size).to eq 1 - expect(attributes.dig(0, :name)).to eq 'test' - expect(attributes.dig(0, :builds_attributes, 0, :name)).to eq 'spinach' + expect(seeds.stages.size).to eq 1 + expect(seeds.stages.dig(0, :name)).to eq 'test' + expect(seeds.jobs.dig(0, :name)).to eq 'spinach' end end end diff --git a/spec/lib/gitlab/ci/stage/seeds_spec.rb b/spec/lib/gitlab/ci/stage/seeds_spec.rb index cc4f37d236e..3824a868fb2 100644 --- a/spec/lib/gitlab/ci/stage/seeds_spec.rb +++ b/spec/lib/gitlab/ci/stage/seeds_spec.rb @@ -6,6 +6,10 @@ describe Gitlab::Ci::Stage::Seeds do subject.append_stage('deploy', [{ name: 'prod', script: 'cap deploy' }]) end + describe '#has_stages?' do + it { is_expected.to have_stages } + end + describe '#stages' do it 'returns hashes of all stages' do expect(subject.stages.size).to eq 2 -- cgit v1.2.1 From fe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 2 Jun 2017 12:16:11 +0200 Subject: Refine implementation of pipeline stage seeds --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 30 ++++++++----- spec/lib/gitlab/ci/stage/seed_spec.rb | 54 +++++++++++++++++++++++ spec/lib/gitlab/ci/stage/seeds_spec.rb | 66 ---------------------------- 3 files changed, 72 insertions(+), 78 deletions(-) create mode 100644 spec/lib/gitlab/ci/stage/seed_spec.rb delete mode 100644 spec/lib/gitlab/ci/stage/seeds_spec.rb (limited to 'spec/lib') diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index 7f652c17ed5..72b9cde10e7 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -91,15 +91,17 @@ module Ci spinach: { stage: 'test', script: 'spinach' }) end - it 'returns correctly fabricated stage seeds object' do - seeds = subject.stage_seeds(ref: 'master') + let(:pipeline) { create(:ci_empty_pipeline) } - expect(seeds.stages.size).to eq 2 - expect(seeds.stages.dig(0, :name)).to eq 'test' - expect(seeds.stages.dig(1, :name)).to eq 'deploy' - expect(seeds.jobs.dig(0, :name)).to eq 'rspec' - expect(seeds.jobs.dig(1, :name)).to eq 'spinach' - expect(seeds.jobs.dig(2, :name)).to eq 'production' + it 'correctly fabricates a stage seeds object' do + seeds = subject.stage_seeds(pipeline) + + expect(seeds.size).to eq 2 + expect(seeds.first.stage[:name]).to eq 'test' + expect(seeds.second.stage[:name]).to eq 'deploy' + expect(seeds.first.builds.dig(0, :name)).to eq 'rspec' + expect(seeds.first.builds.dig(1, :name)).to eq 'spinach' + expect(seeds.second.builds.dig(0, :name)).to eq 'production' end end @@ -109,12 +111,16 @@ module Ci spinach: { stage: 'test', script: 'spinach', only: ['tags'] }) end + let(:pipeline) do + create(:ci_empty_pipeline, ref: 'feature', tag: true) + end + it 'returns stage seeds only assigned to master to master' do - seeds = subject.stage_seeds(ref: 'feature', tag: true) + seeds = subject.stage_seeds(pipeline) - expect(seeds.stages.size).to eq 1 - expect(seeds.stages.dig(0, :name)).to eq 'test' - expect(seeds.jobs.dig(0, :name)).to eq 'spinach' + expect(seeds.size).to eq 1 + expect(seeds.first.stage[:name]).to eq 'test' + expect(seeds.first.builds.dig(0, :name)).to eq 'spinach' end end end diff --git a/spec/lib/gitlab/ci/stage/seed_spec.rb b/spec/lib/gitlab/ci/stage/seed_spec.rb new file mode 100644 index 00000000000..15bcce04447 --- /dev/null +++ b/spec/lib/gitlab/ci/stage/seed_spec.rb @@ -0,0 +1,54 @@ +require 'spec_helper' + +describe Gitlab::Ci::Stage::Seed do + let(:pipeline) { create(:ci_empty_pipeline) } + + let(:builds) do + [{ name: 'rspec' }, { name: 'spinach' }] + end + + subject do + described_class.new(pipeline, 'test', builds) + end + + describe '#stage' do + it 'returns hash attributes of a stage' do + expect(subject.stage).to be_a Hash + expect(subject.stage).to include(:name, :project) + end + end + + describe '#builds' do + it 'returns hash attributes of all builds' do + expect(subject.builds.size).to eq 2 + expect(subject.builds).to all(include(pipeline: pipeline)) + expect(subject.builds).to all(include(project: pipeline.project)) + expect(subject.builds).to all(include(ref: 'master')) + expect(subject.builds).to all(include(tag: false)) + expect(subject.builds) + .to all(include(trigger_request: pipeline.trigger_requests.first)) + end + end + + describe '#user=' do + let(:user) { create(:user) } + + it 'assignes relevant pipeline attributes' do + subject.user = user + + expect(subject.builds).to all(include(user: user)) + end + end + + describe '#create!' do + it 'creates all stages and builds' do + subject.create! + + expect(pipeline.reload.stages.count).to eq 1 + expect(pipeline.reload.builds.count).to eq 2 + expect(pipeline.builds).to all(satisfy { |job| job.stage_id.present? }) + expect(pipeline.builds).to all(satisfy { |job| job.pipeline.present? }) + expect(pipeline.builds).to all(satisfy { |job| job.project.present? }) + end + end +end diff --git a/spec/lib/gitlab/ci/stage/seeds_spec.rb b/spec/lib/gitlab/ci/stage/seeds_spec.rb deleted file mode 100644 index 3824a868fb2..00000000000 --- a/spec/lib/gitlab/ci/stage/seeds_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'spec_helper' - -describe Gitlab::Ci::Stage::Seeds do - before do - subject.append_stage('test', [{ name: 'rspec' }, { name: 'spinach' }]) - subject.append_stage('deploy', [{ name: 'prod', script: 'cap deploy' }]) - end - - describe '#has_stages?' do - it { is_expected.to have_stages } - end - - describe '#stages' do - it 'returns hashes of all stages' do - expect(subject.stages.size).to eq 2 - expect(subject.stages).to all(be_a Hash) - end - end - - describe '#jobs' do - it 'returns all jobs in all stages' do - expect(subject.jobs.size).to eq 3 - end - end - - describe '#pipeline=' do - let(:pipeline) do - create(:ci_empty_pipeline, ref: 'feature', tag: true) - end - - it 'assignes relevant pipeline attributes' do - trigger_request = pipeline.trigger_requests.first - - subject.pipeline = pipeline - - expect(subject.stages).to all(include(pipeline: pipeline)) - expect(subject.stages).to all(include(project: pipeline.project)) - expect(subject.jobs).to all(include(pipeline: pipeline)) - expect(subject.jobs).to all(include(project: pipeline.project)) - expect(subject.jobs).to all(include(ref: 'feature')) - expect(subject.jobs).to all(include(tag: true)) - expect(subject.jobs).to all(include(trigger_request: trigger_request)) - end - end - - describe '#user=' do - let(:user) { create(:user) } - - it 'assignes relevant pipeline attributes' do - subject.user = user - - expect(subject.jobs).to all(include(user: user)) - end - end - - describe '#to_attributes' do - it 'exposes stage attributes with nested jobs' do - attributes = [{ name: 'test', builds_attributes: - [{ name: 'rspec' }, { name: 'spinach' }] }, - { name: 'deploy', builds_attributes: - [{ name: 'prod', script: 'cap deploy' }] }] - - expect(subject.to_attributes).to eq attributes - end - end -end -- cgit v1.2.1 From 626cb8edc3f4421fe7e866c51fddc2715875ddda Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 2 Jun 2017 15:05:14 +0200 Subject: Fix invalid conditional in pipeline create service --- spec/lib/gitlab/ci/stage/seed_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/ci/stage/seed_spec.rb b/spec/lib/gitlab/ci/stage/seed_spec.rb index 15bcce04447..f4353040ce6 100644 --- a/spec/lib/gitlab/ci/stage/seed_spec.rb +++ b/spec/lib/gitlab/ci/stage/seed_spec.rb @@ -21,10 +21,9 @@ describe Gitlab::Ci::Stage::Seed do describe '#builds' do it 'returns hash attributes of all builds' do expect(subject.builds.size).to eq 2 - expect(subject.builds).to all(include(pipeline: pipeline)) - expect(subject.builds).to all(include(project: pipeline.project)) expect(subject.builds).to all(include(ref: 'master')) expect(subject.builds).to all(include(tag: false)) + expect(subject.builds).to all(include(project: pipeline.project)) expect(subject.builds) .to all(include(trigger_request: pipeline.trigger_requests.first)) end -- cgit v1.2.1 From 3801a0df80306a76dc340ca74427a124a1514dbb Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 5 Jun 2017 10:34:30 +0200 Subject: Export pipeline stages in import/export feature --- spec/lib/gitlab/import_export/all_models.yml | 7 +++++++ spec/lib/gitlab/import_export/safe_model_attributes.yml | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 34f617e23a5..6e6e94d0bbb 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -91,6 +91,7 @@ merge_request_diff: pipelines: - project - user +- stages - statuses - builds - trigger_requests @@ -104,9 +105,15 @@ pipelines: - artifacts - pipeline_schedule - merge_requests +stages: +- project +- pipeline +- statuses +- builds statuses: - project - pipeline +- stage - user - auto_canceled_by variables: diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 2388aea24d9..37783f63843 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -191,6 +191,13 @@ Ci::Pipeline: - lock_version - auto_canceled_by_id - pipeline_schedule_id +Ci::Stage: +- id +- name +- project_id +- pipeline_id +- created_at +- updated_at CommitStatus: - id - project_id -- cgit v1.2.1 From 8808e7bcf518e16fa36762a9b01f6cf224233f06 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 5 Jun 2017 12:54:52 +0200 Subject: Add assertions about new pipeline stage in specs --- spec/lib/gitlab/ci/stage/seed_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/ci/stage/seed_spec.rb b/spec/lib/gitlab/ci/stage/seed_spec.rb index f4353040ce6..47a797cfe8f 100644 --- a/spec/lib/gitlab/ci/stage/seed_spec.rb +++ b/spec/lib/gitlab/ci/stage/seed_spec.rb @@ -48,6 +48,10 @@ describe Gitlab::Ci::Stage::Seed do expect(pipeline.builds).to all(satisfy { |job| job.stage_id.present? }) expect(pipeline.builds).to all(satisfy { |job| job.pipeline.present? }) expect(pipeline.builds).to all(satisfy { |job| job.project.present? }) + expect(pipeline.stages) + .to all(satisfy { |stage| stage.pipeline.present? }) + expect(pipeline.stages) + .to all(satisfy { |stage| stage.project.present? }) end end end -- cgit v1.2.1 From 25b26c2f2844178d66a6fde7f728a5e72841e9d2 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 5 Jun 2017 15:01:15 +0200 Subject: Fix typo in import/export safe model attributes --- spec/lib/gitlab/import_export/safe_model_attributes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 24665645277..34457bf36fe 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -199,7 +199,7 @@ Ci::Stage: - pipeline_id - created_at - updated_at -ommitStatus: +CommitStatus: - id - project_id - status -- cgit v1.2.1 From da0852e08aa07354706be1e0be9251ccf02e85be Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 5 Jun 2017 15:23:09 +0200 Subject: Improve specs for pipeline and pipeline seeds --- spec/lib/gitlab/ci/stage/seed_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/ci/stage/seed_spec.rb b/spec/lib/gitlab/ci/stage/seed_spec.rb index 47a797cfe8f..d7e91a5a62c 100644 --- a/spec/lib/gitlab/ci/stage/seed_spec.rb +++ b/spec/lib/gitlab/ci/stage/seed_spec.rb @@ -30,7 +30,7 @@ describe Gitlab::Ci::Stage::Seed do end describe '#user=' do - let(:user) { create(:user) } + let(:user) { build(:user) } it 'assignes relevant pipeline attributes' do subject.user = user -- cgit v1.2.1