Fix MigrateRepositoryService spec when repo is already on disk

Running this after
spec/services/projects/hashed_storage/migrate_repository_service_spec.rb would fail
previously, because the new repository path already existed on disk. As this spec expects
the new repository path to not exist on disk prior to being moved, we should clear out
the test repos before running.
parent 5fe20b11
...@@ -10,6 +10,10 @@ describe Projects::HashedStorage::MigrateRepositoryService do ...@@ -10,6 +10,10 @@ describe Projects::HashedStorage::MigrateRepositoryService do
set(:primary) { create(:geo_node, :primary) } set(:primary) { create(:geo_node, :primary) }
set(:secondary) { create(:geo_node) } set(:secondary) { create(:geo_node) }
before do
TestEnv.clean_test_path
end
it 'creates a Geo::HashedStorageMigratedEvent on success' do it 'creates a Geo::HashedStorageMigratedEvent on success' do
expect { service.execute }.to change(Geo::EventLog, :count).by(1) expect { service.execute }.to change(Geo::EventLog, :count).by(1)
......
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