Commit 5b52da9c authored by Kamil Trzcinski's avatar Kamil Trzcinski

Revert unrelevant changes

parent 7cdb5173
...@@ -250,8 +250,9 @@ module Ci ...@@ -250,8 +250,9 @@ module Ci
end end
def execute_hooks def execute_hooks
project.execute_hooks(pipeline_data, :pipeline_hooks) data = pipeline_data
project.execute_services(pipeline_data, :pipeline_hooks) project.execute_hooks(data, :pipeline_hooks)
project.execute_services(data, :pipeline_hooks)
end end
private private
......
...@@ -39,8 +39,7 @@ describe NotesHelper do ...@@ -39,8 +39,7 @@ describe NotesHelper do
describe '#preload_max_access_for_authors' do describe '#preload_max_access_for_authors' do
before do before do
# #preload_max_access_for_authors would read cache from RequestStore, # This method reads cache from RequestStore, so make sure it's clean.
# so we should make sure it's clean.
RequestStore.clear! RequestStore.clear!
end end
......
...@@ -275,8 +275,7 @@ describe Ci::Build, models: true do ...@@ -275,8 +275,7 @@ describe Ci::Build, models: true do
context 'when yaml_variables are undefined' do context 'when yaml_variables are undefined' do
before do before do
build.update(yaml_variables: nil) build.yaml_variables = nil
build.reload # reload pipeline so that it resets config_processor
end end
context 'use from gitlab-ci.yml' do context 'use from gitlab-ci.yml' do
...@@ -424,24 +423,22 @@ describe Ci::Build, models: true do ...@@ -424,24 +423,22 @@ describe Ci::Build, models: true do
describe '#stuck?' do describe '#stuck?' do
subject { build.stuck? } subject { build.stuck? }
%w[pending].each do |state| context "when commit_status.status is pending" do
context "when commit_status.status is #{state}" do before do
before do build.status = 'pending'
build.status = state end
end
it { is_expected.to be_truthy }
context "and there are specific runner" do it { is_expected.to be_truthy }
let(:runner) { create(:ci_runner, contacted_at: 1.second.ago) }
before do context "and there are specific runner" do
build.project.runners << runner let(:runner) { create(:ci_runner, contacted_at: 1.second.ago) }
runner.save
end
it { is_expected.to be_falsey } before do
build.project.runners << runner
runner.save
end end
it { is_expected.to be_falsey }
end end
end end
...@@ -904,8 +901,7 @@ describe Ci::Build, models: true do ...@@ -904,8 +901,7 @@ describe Ci::Build, models: true do
context 'when `when` is undefined' do context 'when `when` is undefined' do
before do before do
build.update(when: nil) build.when = nil
build.reload # reload pipeline so that it resets config_processor
end end
context 'use from gitlab-ci.yml' do context 'use from gitlab-ci.yml' 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