diff options
Diffstat (limited to 'spec/lib/gitlab/ci/templates')
8 files changed, 38 insertions, 21 deletions
diff --git a/spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb index 16c5d7a4b6d..286f3d10b7f 100644 --- a/spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml' do +RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml', feature_category: :continuous_integration do subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Jobs/Code-Quality') } describe 'the created pipeline' do @@ -63,7 +63,8 @@ RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml' do context 'on master' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end @@ -72,7 +73,8 @@ RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end @@ -81,7 +83,8 @@ RSpec.describe 'Jobs/Code-Quality.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end end diff --git a/spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb index 8a5aea7c0f0..68d249e31f9 100644 --- a/spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Jobs/SAST-IaC.gitlab-ci.yml' do +RSpec.describe 'Jobs/SAST-IaC.gitlab-ci.yml', feature_category: :continuous_integration do subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Jobs/SAST-IaC') } describe 'the created pipeline' do @@ -50,7 +50,8 @@ RSpec.describe 'Jobs/SAST-IaC.gitlab-ci.yml' do context 'on default branch' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end @@ -59,7 +60,8 @@ RSpec.describe 'Jobs/SAST-IaC.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end end diff --git a/spec/lib/gitlab/ci/templates/Jobs/sast_iac_latest_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/Jobs/sast_iac_latest_gitlab_ci_yaml_spec.rb index d540b035f81..039a6a739dd 100644 --- a/spec/lib/gitlab/ci/templates/Jobs/sast_iac_latest_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/Jobs/sast_iac_latest_gitlab_ci_yaml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Jobs/SAST-IaC.latest.gitlab-ci.yml' do +RSpec.describe 'Jobs/SAST-IaC.latest.gitlab-ci.yml', feature_category: :continuous_integration do subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Jobs/SAST-IaC.latest') } describe 'the created pipeline' do @@ -51,7 +51,8 @@ RSpec.describe 'Jobs/SAST-IaC.latest.gitlab-ci.yml' do context 'on default branch' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end @@ -60,7 +61,8 @@ RSpec.describe 'Jobs/SAST-IaC.latest.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end end diff --git a/spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb index 7cf0cf3ed33..d73d8a15feb 100644 --- a/spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Jobs/Test.gitlab-ci.yml' do +RSpec.describe 'Jobs/Test.gitlab-ci.yml', feature_category: :continuous_integration do subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Jobs/Test') } describe 'the created pipeline' do @@ -63,7 +63,8 @@ RSpec.describe 'Jobs/Test.gitlab-ci.yml' do context 'on master' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end @@ -72,7 +73,8 @@ RSpec.describe 'Jobs/Test.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end @@ -81,7 +83,8 @@ RSpec.describe 'Jobs/Test.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end 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 b2ca906e172..09ca2678de5 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 @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do +RSpec.describe 'Auto-DevOps.gitlab-ci.yml', feature_category: :auto_devops do using RSpec::Parameterized::TableSyntax subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps') } diff --git a/spec/lib/gitlab/ci/templates/npm_spec.rb b/spec/lib/gitlab/ci/templates/npm_spec.rb index 55fd4675f11..a949a7ccfb1 100644 --- a/spec/lib/gitlab/ci/templates/npm_spec.rb +++ b/spec/lib/gitlab/ci/templates/npm_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'npm.gitlab-ci.yml' do +RSpec.describe 'npm.gitlab-ci.yml', feature_category: :continuous_integration do subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('npm') } describe 'the created pipeline' do @@ -43,7 +43,8 @@ RSpec.describe 'npm.gitlab-ci.yml' do shared_examples 'no pipeline created' do it 'does not create a pipeline because the only job (publish) is not created' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end diff --git a/spec/lib/gitlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb index 6ae51f9783b..a81f29d0d01 100644 --- a/spec/lib/gitlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/terraform_latest_gitlab_ci_yaml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Terraform.latest.gitlab-ci.yml' do +RSpec.describe 'Terraform.latest.gitlab-ci.yml', feature_category: :continuous_integration do before do allow(Gitlab::Template::GitlabCiYmlTemplate).to receive(:excluded_patterns).and_return([]) end @@ -66,7 +66,12 @@ RSpec.describe 'Terraform.latest.gitlab-ci.yml' do it 'does not create a branch pipeline', :aggregate_failures do expect(branch_build_names).to be_empty - expect(branch_pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(branch_pipeline.errors.full_messages).to match_array( + [ + 'Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.' + ] + ) end end end diff --git a/spec/lib/gitlab/ci/templates/themekit_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/themekit_gitlab_ci_yaml_spec.rb index 157fd39f1cc..607db33f61a 100644 --- a/spec/lib/gitlab/ci/templates/themekit_gitlab_ci_yaml_spec.rb +++ b/spec/lib/gitlab/ci/templates/themekit_gitlab_ci_yaml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'ThemeKit.gitlab-ci.yml' do +RSpec.describe 'ThemeKit.gitlab-ci.yml', feature_category: :continuous_integration do before do allow(Gitlab::Template::GitlabCiYmlTemplate).to receive(:excluded_patterns).and_return([]) end @@ -52,7 +52,8 @@ RSpec.describe 'ThemeKit.gitlab-ci.yml' do it 'has no jobs' do expect(build_names).to be_empty - expect(pipeline.errors.full_messages).to match_array(["No stages / jobs for this pipeline."]) + expect(pipeline.errors.full_messages).to match_array(['Pipeline will not run for the selected trigger. ' \ + 'The rules configuration prevented any jobs from being added to the pipeline.']) end end end |