diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 12:08:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 12:08:16 +0300 |
commit | 6044caed20964a70c1ac6c5a3365d567ed96dfde (patch) | |
tree | 3fe8f14b4acbd542265544843efeb6f59b5d3efe /spec/lib/gitlab/ci | |
parent | 92077e0f8d70c70a908395808b16f98ecd3a5fcd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/ci')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/chain/config/content_spec.rb | 79 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb | 2 |
2 files changed, 15 insertions, 66 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/config/content_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/config/content_spec.rb index 4c4359ad5d2..b5f0783cb42 100644 --- a/spec/lib/gitlab/ci/pipeline/chain/config/content_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/chain/config/content_spec.rb @@ -45,7 +45,7 @@ describe Gitlab::Ci::Pipeline::Chain::Config::Content do subject.perform! expect(pipeline.config_source).to eq 'auto_devops_source' - template = Gitlab::Template::GitlabCiYmlTemplate.find('Beta/Auto-DevOps') + template = Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps') expect(command.config_content).to eq(template.content) end end @@ -78,7 +78,7 @@ describe Gitlab::Ci::Pipeline::Chain::Config::Content do expect(pipeline.config_source).to eq 'auto_devops_source' expect(pipeline.pipeline_config).to be_nil - template = Gitlab::Template::GitlabCiYmlTemplate.find('Beta/Auto-DevOps') + template = Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps') expect(command.config_content).to eq(template.content) end end @@ -91,7 +91,7 @@ describe Gitlab::Ci::Pipeline::Chain::Config::Content do expect(pipeline.config_source).to eq 'auto_devops_source' expect(pipeline.pipeline_config).to be_nil - template = Gitlab::Template::GitlabCiYmlTemplate.find('Beta/Auto-DevOps') + template = Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps') expect(command.config_content).to eq(template.content) end end @@ -122,34 +122,13 @@ describe Gitlab::Ci::Pipeline::Chain::Config::Content do expect(project).to receive(:auto_devops_enabled?).and_return(true) end - context 'when beta is enabled' do - before do - stub_feature_flags(auto_devops_beta: true) - end - - it 'returns the content of AutoDevops template' do - subject.perform! - - expect(pipeline.config_source).to eq 'auto_devops_source' - expect(pipeline.pipeline_config).to be_nil - template = Gitlab::Template::GitlabCiYmlTemplate.find('Beta/Auto-DevOps') - expect(command.config_content).to eq(template.content) - end - end - - context 'when beta is disabled' do - before do - stub_feature_flags(auto_devops_beta: false) - end - - it 'returns the content of AutoDevops template' do - subject.perform! + it 'returns the content of AutoDevops template' do + subject.perform! - expect(pipeline.config_source).to eq 'auto_devops_source' - expect(pipeline.pipeline_config).to be_nil - template = Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps') - expect(command.config_content).to eq(template.content) - end + expect(pipeline.config_source).to eq 'auto_devops_source' + expect(pipeline.pipeline_config).to be_nil + template = Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps') + expect(command.config_content).to eq(template.content) end end @@ -285,7 +264,7 @@ describe Gitlab::Ci::Pipeline::Chain::Config::Content do <<~EOY --- include: - - template: Beta/Auto-DevOps.gitlab-ci.yml + - template: Auto-DevOps.gitlab-ci.yml EOY end @@ -293,40 +272,12 @@ describe Gitlab::Ci::Pipeline::Chain::Config::Content do expect(project).to receive(:auto_devops_enabled?).and_return(true) end - context 'when beta is enabled' do - before do - stub_feature_flags(auto_devops_beta: true) - end - - it 'builds root config including the auto-devops template' do - subject.perform! - - expect(pipeline.config_source).to eq 'auto_devops_source' - expect(pipeline.pipeline_config.content).to eq(config_content_result) - expect(command.config_content).to eq(config_content_result) - end - end - - context 'when beta is disabled' do - before do - stub_feature_flags(auto_devops_beta: false) - end - - let(:config_content_result) do - <<~EOY - --- - include: - - template: Auto-DevOps.gitlab-ci.yml - EOY - end - - it 'builds root config including the auto-devops template' do - subject.perform! + it 'builds root config including the auto-devops template' do + subject.perform! - expect(pipeline.config_source).to eq 'auto_devops_source' - expect(pipeline.pipeline_config.content).to eq(config_content_result) - expect(command.config_content).to eq(config_content_result) - end + expect(pipeline.config_source).to eq 'auto_devops_source' + expect(pipeline.pipeline_config.content).to eq(config_content_result) + expect(command.config_content).to eq(config_content_result) end end diff --git a/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb index 12600d97b2f..0c5d172f17c 100644 --- a/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb @@ -133,8 +133,6 @@ describe 'Auto-DevOps.gitlab-ci.yml' do end with_them do - subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Beta/Auto-DevOps') } - let(:user) { create(:admin) } let(:project) { create(:project, :custom_repo, files: files) } let(:service) { Ci::CreatePipelineService.new(project, user, ref: 'master' ) } |