diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-21 03:07:37 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-21 03:07:37 +0000 |
commit | bc3e57199e52e45799cb4d47ee2630af40d1edc3 (patch) | |
tree | ecf9aab2b81f91f857d4d116fbf4448675c7a2d8 /spec/services/deployments/after_create_service_spec.rb | |
parent | bb348db4c22bf58ac685fcd66445ac172491b302 (diff) | |
download | gitlab-ce-bc3e57199e52e45799cb4d47ee2630af40d1edc3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/deployments/after_create_service_spec.rb')
-rw-r--r-- | spec/services/deployments/after_create_service_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/services/deployments/after_create_service_spec.rb b/spec/services/deployments/after_create_service_spec.rb index 4ca96658db0..14b6dd4a74e 100644 --- a/spec/services/deployments/after_create_service_spec.rb +++ b/spec/services/deployments/after_create_service_spec.rb @@ -6,10 +6,18 @@ describe Deployments::AfterCreateService do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:options) { { name: 'production' } } + let(:pipeline) do + create( + :ci_pipeline, + sha: 'b83d6e391c22777fca1ed3012fce84f633d7fed0', + project: project + ) + end let(:job) do create(:ci_build, :with_deployment, + pipeline: pipeline, ref: 'master', tag: false, environment: 'production', @@ -139,6 +147,7 @@ describe Deployments::AfterCreateService do let(:job) do create(:ci_build, :with_deployment, + pipeline: pipeline, ref: 'master', environment: 'production', project: project, @@ -152,6 +161,7 @@ describe Deployments::AfterCreateService do let(:job) do create(:ci_build, :with_deployment, + pipeline: pipeline, ref: 'master', environment: 'prod-slug', project: project, @@ -165,6 +175,7 @@ describe Deployments::AfterCreateService do let(:job) do create(:ci_build, :with_deployment, + pipeline: pipeline, yaml_variables: [{ key: :APP_HOST, value: 'host' }], environment: 'production', project: project, @@ -175,7 +186,7 @@ describe Deployments::AfterCreateService do end context 'when yaml environment does not have url' do - let(:job) { create(:ci_build, :with_deployment, environment: 'staging', project: project) } + let(:job) { create(:ci_build, :with_deployment, pipeline: pipeline, environment: 'staging', project: project) } it 'returns the external_url from persisted environment' do is_expected.to be_nil @@ -202,6 +213,7 @@ describe Deployments::AfterCreateService do let(:job) do create(:ci_build, :with_deployment, + pipeline: pipeline, ref: 'master', tag: false, environment: 'staging', |