Commit c048d5d2 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix entry lookup in CI config inheritance rules

parent 4c34b4e5
...@@ -108,7 +108,7 @@ module Gitlab ...@@ -108,7 +108,7 @@ module Gitlab
self.class.nodes.each_key do |key| self.class.nodes.each_key do |key|
global_entry = deps[key] global_entry = deps[key]
job_entry = @entries[key] job_entry = self[key]
if global_entry.specified? && !job_entry.specified? if global_entry.specified? && !job_entry.specified?
@entries[key] = global_entry @entries[key] = global_entry
......
...@@ -254,7 +254,9 @@ describe Gitlab::Ci::Config::Entry::Global do ...@@ -254,7 +254,9 @@ describe Gitlab::Ci::Config::Entry::Global do
end end
context 'when job does not have commands' do context 'when job does not have commands' do
let(:hash) { { rspec: { stage: 'test' } } } let(:hash) do
{ before_script: ['echo 123'], rspec: { stage: 'test' } }
end
describe '#errors' do describe '#errors' do
it 'reports errors about missing script' do it 'reports errors about missing script' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment