diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:08:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:08:22 +0000 |
commit | 123c68a7cf788ace140e57e478a12c5b7ac893ae (patch) | |
tree | b36e565ecd895ee46c1713f3734308cfce0e6ba9 /spec/lib/gitlab/ci/pipeline | |
parent | 862d225ca0d8eb452e56b8fe5a0109aac796e872 (diff) | |
download | gitlab-ce-123c68a7cf788ace140e57e478a12c5b7ac893ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb | 46 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/build_spec.rb | 9 |
2 files changed, 0 insertions, 55 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb deleted file mode 100644 index bf6985156d3..00000000000 --- a/spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -describe Gitlab::Ci::Pipeline::Seed::Build::ResourceGroup do - let_it_be(:project) { create(:project) } - let(:job) { build(:ci_build, project: project) } - let(:seed) { described_class.new(job, resource_group_key) } - - describe '#to_resource' do - subject { seed.to_resource } - - context 'when resource group key is specified' do - let(:resource_group_key) { 'iOS' } - - it 'returns a resource group object' do - is_expected.to be_a(Ci::ResourceGroup) - expect(subject.key).to eq('iOS') - end - - context 'when environment has an invalid URL' do - let(:resource_group_key) { ':::' } - - it 'returns nothing' do - is_expected.to be_nil - end - end - - context 'when there is a resource group already' do - let!(:resource_group) { create(:ci_resource_group, project: project, key: 'iOS') } - - it 'does not create a new resource group' do - expect { subject }.not_to change { Ci::ResourceGroup.count } - end - end - end - - context 'when resource group key is nil' do - let(:resource_group_key) { nil } - - it 'returns nothing' do - is_expected.to be_nil - end - end - end -end diff --git a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb index 5526ec9e16f..2ae513aea1b 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb @@ -231,15 +231,6 @@ describe Gitlab::Ci::Pipeline::Seed::Build do end end end - - context 'when job belongs to a resource group' do - let(:attributes) { { name: 'rspec', ref: 'master', resource_group_key: 'iOS' } } - - it 'returns a job with resource group' do - expect(subject.resource_group).not_to be_nil - expect(subject.resource_group.key).to eq('iOS') - end - end end context 'when job is a bridge' do |