Commit c8e6ea01 authored by Pedro Pombeiro's avatar Pedro Pombeiro

Remove left-over project argument

parent 366d16cd
...@@ -33,7 +33,7 @@ module Ci ...@@ -33,7 +33,7 @@ module Ci
end end
def runner_variables def runner_variables
variables.sort_and_expand_all(project, keep_undefined: true).to_runner_variables variables.sort_and_expand_all(keep_undefined: true).to_runner_variables
end end
def refspecs def refspecs
......
...@@ -173,7 +173,7 @@ module Gitlab ...@@ -173,7 +173,7 @@ module Gitlab
end end
def variable_expansion_errors def variable_expansion_errors
expanded_collection = evaluate_context.variables.sort_and_expand_all(@pipeline.project) expanded_collection = evaluate_context.variables.sort_and_expand_all
errors = expanded_collection.errors errors = expanded_collection.errors
["#{name}: #{errors}"] if errors ["#{name}: #{errors}"] if errors
end end
......
...@@ -89,7 +89,7 @@ module Gitlab ...@@ -89,7 +89,7 @@ module Gitlab
end end
end end
def sort_and_expand_all(project, keep_undefined: false) def sort_and_expand_all(keep_undefined: false)
sorted = Sort.new(self) sorted = Sort.new(self)
return self.class.new(self, sorted.errors) unless sorted.valid? return self.class.new(self, sorted.errors) unless sorted.valid?
......
...@@ -358,8 +358,6 @@ RSpec.describe Gitlab::Ci::Variables::Collection do ...@@ -358,8 +358,6 @@ RSpec.describe Gitlab::Ci::Variables::Collection do
end end
describe '#sort_and_expand_all' do describe '#sort_and_expand_all' do
let_it_be(:project) { create(:project) }
context 'table tests' do context 'table tests' do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
...@@ -550,7 +548,7 @@ RSpec.describe Gitlab::Ci::Variables::Collection do ...@@ -550,7 +548,7 @@ RSpec.describe Gitlab::Ci::Variables::Collection do
with_them do with_them do
let(:collection) { Gitlab::Ci::Variables::Collection.new(variables) } let(:collection) { Gitlab::Ci::Variables::Collection.new(variables) }
subject { collection.sort_and_expand_all(project, keep_undefined: keep_undefined) } subject { collection.sort_and_expand_all(keep_undefined: keep_undefined) }
it 'returns Collection' do it 'returns Collection' do
is_expected.to be_an_instance_of(Gitlab::Ci::Variables::Collection) is_expected.to be_an_instance_of(Gitlab::Ci::Variables::Collection)
......
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