diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-10-30 15:04:25 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-10-30 15:06:00 +0100 |
commit | 94923328fdf2904e5a31ad8b9c40adcf15428bb2 (patch) | |
tree | 473bcc038dac0613ff14663271f2f7a46d734502 /spec/lib/gitlab | |
parent | 3cbea3b95d2d20de7b65ef0775959c1c153c4e15 (diff) | |
download | gitlab-ce-94923328fdf2904e5a31ad8b9c40adcf15428bb2.tar.gz |
Revert Seed based parallelization implementation
Revert "Add Build seed specs"
This reverts commit 03bc722ea1797a6b2b09f2897215477f5b269632.
Revert "Add build specs"
This reverts commit c2d49565cf787c592c4f8bd9f24843babd2a6c9a.
Revert "Refactor parallelization implementation"
This reverts commit 72430483ded51e9a7d01ef70c3dce3dda174fac1.
Revert "Implement POC for job parallelization"
This reverts commit 44b740f99dfe6a4344c918fd4c94972aa6f9237e.
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/build_spec.rb | 59 |
1 files changed, 3 insertions, 56 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb index d75f385f368..fffa727c2ed 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb @@ -13,46 +13,6 @@ describe Gitlab::Ci::Pipeline::Seed::Build do described_class.new(pipeline, attributes) end - describe '#parallel?' do - context 'when build is not parallelized' do - it 'should be false' do - expect(subject.parallel?).to eq(false) - end - end - - context 'when build is parallelized' do - before do - attributes[:options] = { parallel: 5 } - end - - it 'should be true' do - expect(subject.parallel?).to eq(true) - end - end - end - - describe '#parallelize_build' do - let(:total) { 5 } - - before do - attributes[:options] = { parallel: total } - end - - it 'returns duplicated builds' do - builds = subject.parallelize_build - - expect(builds.size).to eq(total) - end - - it 'returns builds with indexed names' do - builds = subject.parallelize_build - - base_name = builds.first.name.split(' ')[0] - names = builds.map(&:name) - expect(names).to all(match(%r{^#{base_name} \d+/\d+$})) - end - end - describe '#attributes' do it 'returns hash attributes of a build' do expect(subject.attributes).to be_a Hash @@ -62,22 +22,9 @@ describe Gitlab::Ci::Pipeline::Seed::Build do end describe '#to_resource' do - context 'when build is not parallelized' do - it 'returns a valid build resource' do - expect(subject.to_resource).to be_a(::Ci::Build) - expect(subject.to_resource).to be_valid - end - end - - context 'when build is parallelized' do - before do - attributes[:options] = { parallel: 5 } - end - - it 'returns a group of valid build resources' do - expect(subject.to_resource).to all(be_a(::Ci::Build)) - expect(subject.to_resource).to all(be_valid) - end + it 'returns a valid build resource' do + expect(subject.to_resource).to be_a(::Ci::Build) + expect(subject.to_resource).to be_valid end it 'memoizes a resource object' do |