Commit f21f30ae authored by Sean McGivern's avatar Sean McGivern

Merge branch '1645-backfill' into 'master'

Geo: send the new event type with the backfill function

Closes #1645

See merge request !1157
parents 5b49fc34 c60612bb
...@@ -15,9 +15,10 @@ module Geo ...@@ -15,9 +15,10 @@ module Geo
def hook_data def hook_data
{ {
event_name: 'push', event_name: 'repository_update',
project_id: project.id, project_id: project.id,
project: project.hook_attrs project: project.hook_attrs,
remote_url: project.ssh_url_to_repo
} }
end end
end end
......
---
title: 'Geo: send the new event type with the backfill function'
merge_request: 1157
author:
...@@ -63,6 +63,7 @@ describe API::Geo, api: true do ...@@ -63,6 +63,7 @@ describe API::Geo, api: true do
describe 'POST /geo/receive_events push events' do describe 'POST /geo/receive_events push events' do
before(:each) { allow_any_instance_of(::Geo::ScheduleRepoUpdateService).to receive(:execute) } before(:each) { allow_any_instance_of(::Geo::ScheduleRepoUpdateService).to receive(:execute) }
before(:each) { allow_any_instance_of(::Geo::ScheduleRepoFetchService).to receive(:execute) }
let(:push_payload) do let(:push_payload) do
{ {
......
...@@ -17,9 +17,10 @@ describe Geo::RepositoryBackfillService, services: true do ...@@ -17,9 +17,10 @@ describe Geo::RepositoryBackfillService, services: true do
expect(WebMock).to have_requested(:post, geo_node.geo_events_url).with( expect(WebMock).to have_requested(:post, geo_node.geo_events_url).with(
headers: SYSTEM_HOOKS_HEADER, headers: SYSTEM_HOOKS_HEADER,
body: { body: {
event_name: 'push', event_name: 'repository_update',
project_id: project.id, project_id: project.id,
project: project.hook_attrs project: project.hook_attrs,
remote_url: project.ssh_url_to_repo
} }
).once ).once
end end
......
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