Commit 6983184c authored by Valery Sizov's avatar Valery Sizov

Fix specs after merging

!gitlab-org/gitlab-ce/19747 to EE
parent f93acedb
...@@ -9,8 +9,8 @@ module EE ...@@ -9,8 +9,8 @@ module EE
super do super do
::Geo::HashedStorageAttachmentsEventStore.new( ::Geo::HashedStorageAttachmentsEventStore.new(
project, project,
old_disk_path: old_path, old_attachments_path: old_disk_path,
new_disk_path: new_path new_attachments_path: new_disk_path
).create ).create
end end
end end
......
...@@ -2,11 +2,11 @@ require 'spec_helper' ...@@ -2,11 +2,11 @@ require 'spec_helper'
describe Projects::HashedStorage::MigrateAttachmentsService do describe Projects::HashedStorage::MigrateAttachmentsService do
let(:project) { create(:project, storage_version: 1) } let(:project) { create(:project, storage_version: 1) }
let(:service) { described_class.new(project) }
let(:legacy_storage) { Storage::LegacyProject.new(project) } let(:legacy_storage) { Storage::LegacyProject.new(project) }
let(:hashed_storage) { Storage::HashedProject.new(project) } let(:hashed_storage) { Storage::HashedProject.new(project) }
let(:old_attachments_path) { legacy_storage.disk_path } let(:old_attachments_path) { legacy_storage.disk_path }
let(:new_attachments_path) { hashed_storage.disk_path } let(:new_attachments_path) { hashed_storage.disk_path }
let(:service) { described_class.new(project, old_attachments_path) }
describe '#execute' do describe '#execute' do
set(:primary) { create(:geo_node, :primary) } set(:primary) { create(:geo_node, :primary) }
......
...@@ -2,9 +2,9 @@ require 'spec_helper' ...@@ -2,9 +2,9 @@ require 'spec_helper'
describe Projects::HashedStorage::MigrateRepositoryService do describe Projects::HashedStorage::MigrateRepositoryService do
let(:project) { create(:project, :empty_repo, :wiki_repo, :legacy_storage) } let(:project) { create(:project, :empty_repo, :wiki_repo, :legacy_storage) }
let(:service) { described_class.new(project) }
let(:legacy_storage) { Storage::LegacyProject.new(project) } let(:legacy_storage) { Storage::LegacyProject.new(project) }
let(:hashed_storage) { Storage::HashedProject.new(project) } let(:hashed_storage) { Storage::HashedProject.new(project) }
let(:service) { described_class.new(project, legacy_storage.disk_path) }
describe '#execute' do describe '#execute' do
set(:primary) { create(:geo_node, :primary) } set(:primary) { create(:geo_node, :primary) }
......
...@@ -3515,7 +3515,9 @@ describe Project do ...@@ -3515,7 +3515,9 @@ describe Project do
let(:project) { create(:project, :repository, storage_version: 1, skip_disk_validation: true) } let(:project) { create(:project, :repository, storage_version: 1, skip_disk_validation: true) }
it 'moves pages folder to hashed storage' do it 'moves pages folder to hashed storage' do
expect_any_instance_of(Projects::HashedStorage::MigrateAttachmentsService).to receive(:execute) expect_next_instance_of(Projects::HashedStorage::MigrateAttachmentsService) do |service|
expect(service).to receive(:execute)
end
project.rename_repo project.rename_repo
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