Commit 5a493883 authored by James Lopez's avatar James Lopez

fix wiki spec and bad merge

parent 7a99a7fd
...@@ -165,6 +165,10 @@ describe Geo::RepositorySyncService do ...@@ -165,6 +165,10 @@ describe Geo::RepositorySyncService do
it 'resets repository_retry_at' do it 'resets repository_retry_at' do
expect(registry.repository_retry_at).to be_present expect(registry.repository_retry_at).to be_present
end end
it 'sets last_repository_sync_failure' do
expect(registry.last_repository_sync_failure).to eq('Error syncing repository: shell error')
end
end end
end end
...@@ -223,10 +227,6 @@ describe Geo::RepositorySyncService do ...@@ -223,10 +227,6 @@ describe Geo::RepositorySyncService do
# of range" in the first update to the project registry. # of range" in the first update to the project registry.
registry.reload registry.reload
expect(registry.repository_retry_at).to be_nil expect(registry.repository_retry_at).to be_nil
it 'sets last_repository_sync_failure' do
expect(registry.last_repository_sync_failure).to eq('Error syncing repository: shell error')
end
end end
end end
......
...@@ -117,7 +117,7 @@ RSpec.describe Geo::WikiSyncService do ...@@ -117,7 +117,7 @@ RSpec.describe Geo::WikiSyncService do
let(:registry) { Geo::ProjectRegistry.find_by(project_id: project.id) } let(:registry) { Geo::ProjectRegistry.find_by(project_id: project.id) }
before do before do
allow(repository).to receive(:fetch_as_mirror).with(url_to_repo, forced: true) { raise Gitlab::Shell::Error } allow(repository).to receive(:fetch_as_mirror).with(url_to_repo, forced: true) { raise Gitlab::Shell::Error, 'shell error' }
subject.execute subject.execute
end end
...@@ -129,6 +129,10 @@ RSpec.describe Geo::WikiSyncService do ...@@ -129,6 +129,10 @@ RSpec.describe Geo::WikiSyncService do
it 'resets last_wiki_successful_sync_at' do it 'resets last_wiki_successful_sync_at' do
expect(registry.last_wiki_successful_sync_at).to be_nil expect(registry.last_wiki_successful_sync_at).to be_nil
end end
it 'sets last_wiki_sync_failure' do
expect(registry.last_wiki_sync_failure).to eq('Error syncing wiki repository: shell error')
end
end end
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