diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-07 16:40:15 +0200 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-01-31 22:55:32 +0000 |
commit | 109553afd0ba80d47a282eb5e68ce3b5eda1d818 (patch) | |
tree | bfca03be4e7aeb093fd000d346ae6bf79265fc2a | |
parent | c3e483b05b11e862dfe14104c8ba63cbdb11d953 (diff) | |
download | gitlab-ce-109553afd0ba80d47a282eb5e68ce3b5eda1d818.tar.gz |
Fix EE specs after ci_commit rename to pipeline
-rw-r--r-- | app/services/projects/update_pages_service.rb | 2 | ||||
-rw-r--r-- | features/steps/project/pages.rb | 12 | ||||
-rw-r--r-- | spec/services/projects/update_pages_service_spec.rb | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb index 45a28b46d06..f588f6feb8c 100644 --- a/app/services/projects/update_pages_service.rb +++ b/app/services/projects/update_pages_service.rb @@ -52,7 +52,7 @@ module Projects def create_status GenericCommitStatus.new( project: project, - commit: build.commit, + pipeline: build.pipeline, user: build.user, ref: build.ref, stage: 'deploy', diff --git a/features/steps/project/pages.rb b/features/steps/project/pages.rb index 34f97f1ea8b..a76672168fb 100644 --- a/features/steps/project/pages.rb +++ b/features/steps/project/pages.rb @@ -27,13 +27,13 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps end step 'pages are deployed' do - commit = @project.ensure_ci_commit(@project.commit('HEAD').sha) + pipeline = @project.ensure_pipeline(@project.commit('HEAD').sha, 'HEAD') build = build(:ci_build, - project: @project, - commit: commit, - ref: 'HEAD', - artifacts_file: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip'), - artifacts_metadata: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip.meta') + project: @project, + pipeline: pipeline, + ref: 'HEAD', + artifacts_file: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip'), + artifacts_metadata: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip.meta') ) result = ::Projects::UpdatePagesService.new(@project, build).execute expect(result[:status]).to eq(:success) diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb index 51da582c497..4eac7875864 100644 --- a/spec/services/projects/update_pages_service_spec.rb +++ b/spec/services/projects/update_pages_service_spec.rb @@ -2,8 +2,8 @@ require "spec_helper" describe Projects::UpdatePagesService do let(:project) { create :project } - let(:commit) { create :ci_commit, project: project, sha: project.commit('HEAD').sha } - let(:build) { create :ci_build, commit: commit, ref: 'HEAD' } + let(:pipeline) { create :ci_pipeline, project: project, sha: project.commit('HEAD').sha } + let(:build) { create :ci_build, pipeline: pipeline, ref: 'HEAD' } let(:invalid_file) { fixture_file_upload(Rails.root + 'spec/fixtures/dk.png') } subject { described_class.new(project, build) } @@ -47,7 +47,7 @@ describe Projects::UpdatePagesService do end it 'fails if sha on branch is not latest' do - commit.update_attributes(sha: 'old_sha') + pipeline.update_attributes(sha: 'old_sha') build.update_attributes(artifacts_file: file) expect(execute).to_not eq(:success) end |