Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 10:53:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 10:53:40 +0300
commitcfc792b9ca064990e6540cb742e80529ea669a81 (patch)
tree147cd4256319990cebbc02fe8e4fbbbe06f5720a /spec/services/ci/create_pipeline_service_spec.rb
parent93c6764dacd4c605027ef1cd367d3aebe420b223 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/create_pipeline_service_spec.rb')
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index d450bb12e8c..3d2d8691c68 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -781,6 +781,25 @@ describe Ci::CreatePipelineService do
end
end
+ context 'with environment with auto_stop_in' do
+ before do
+ config = YAML.dump(
+ deploy: {
+ environment: { name: "review/$CI_COMMIT_REF_NAME", auto_stop_in: '1 day' },
+ script: 'ls'
+ })
+
+ stub_ci_pipeline_yaml_file(config)
+ end
+
+ it 'creates the environment with auto stop in' do
+ result = execute_service
+
+ expect(result).to be_persisted
+ expect(result.builds.first.options[:environment][:auto_stop_in]).to eq('1 day')
+ end
+ end
+
context 'with environment name including persisted variables' do
before do
config = YAML.dump(