summaryrefslogtreecommitdiff
path: root/spec/models/ci
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-11-01 16:17:08 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-11-01 16:18:27 +0100
commit73e17446ef400a8f2a4e629c79749d7feb9866f3 (patch)
tree3136a00950d9b75002505a2fe2c78ada4fed9495 /spec/models/ci
parent77715e47d633f3db3b6b58c1d67b4ddbe3668177 (diff)
downloadgitlab-ce-73e17446ef400a8f2a4e629c79749d7feb9866f3.tar.gz
Move parallelized node index to job options
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb26
1 files changed, 1 insertions, 25 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 41c3c37a7f2..957219b3985 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2348,6 +2348,7 @@ describe Ci::Build do
before do
build.options[:parallel] = total
+ build.options[:instance] = index
build.name = "#{build.name} #{index}/#{total}"
end
@@ -2470,31 +2471,6 @@ describe Ci::Build do
end
end
end
-
- describe '#node_index' do
- subject { build.send(:node_index) }
- let(:index) { 4 }
-
- context 'when build has only one index' do
- before do
- build.name = "#{build.name} #{index}/5"
- end
-
- it 'returns the index' do
- expect(subject).to eq(index.to_s)
- end
- end
-
- context 'when build has more than one one index' do
- before do
- build.name = "test_build 1/3 #{index}/5"
- end
-
- it 'returns the last index' do
- expect(subject).to eq(index.to_s)
- end
- end
- end
end
describe '#scoped_variables' do