diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 10:53:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 10:53:40 +0300 |
commit | cfc792b9ca064990e6540cb742e80529ea669a81 (patch) | |
tree | 147cd4256319990cebbc02fe8e4fbbbe06f5720a /spec/services/ci/create_pipeline_service_spec.rb | |
parent | 93c6764dacd4c605027ef1cd367d3aebe420b223 (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.rb | 19 |
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( |