diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb deleted file mode 100644 index 14aaf717453..00000000000 --- a/spec/lib/gitlab/ci/templates/managed_cluster_applications_gitlab_ci_yaml_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Managed-Cluster-Applications.gitlab-ci.yml' do - subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Managed-Cluster-Applications') } - - describe 'the created pipeline' do - let_it_be(:user) { create(:user) } - - let(:project) { create(:project, :custom_repo, namespace: user.namespace, files: { 'README.md' => '' }) } - let(:service) { Ci::CreatePipelineService.new(project, user, ref: pipeline_branch ) } - let(:pipeline) { service.execute!(:push).payload } - let(:build_names) { pipeline.builds.pluck(:name) } - let(:default_branch) { project.default_branch_or_main } - let(:pipeline_branch) { default_branch } - - before do - stub_ci_pipeline_yaml_file(template.content) - end - - context 'for a default branch' do - it 'creates a apply job' do - expect(build_names).to match_array('apply') - end - end - - context 'outside of default branch' do - let(:pipeline_branch) { 'a_branch' } - - before do - project.repository.create_branch(pipeline_branch, default_branch) - end - - it 'has no jobs' do - expect { pipeline }.to raise_error(Ci::CreatePipelineService::CreateError, 'No stages / jobs for this pipeline.') - end - end - end -end |