diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-11-21 18:38:32 +0300 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-11-23 16:19:36 +0300 |
commit | 4b87c1afaa652d72fa6aeeb4fe52fa3883e2f4c8 (patch) | |
tree | 31a1eb3ae197d588b16401d6d03147b900530433 /spec/services/projects/hashed_storage/migrate_repository_service_spec.rb | |
parent | 9fd31eb469de5099f7a7b44840d7930bc3c42bbe (diff) |
when rollingback repository migration, toggle readonly mode back
Diffstat (limited to 'spec/services/projects/hashed_storage/migrate_repository_service_spec.rb')
-rw-r--r-- | spec/services/projects/hashed_storage/migrate_repository_service_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb b/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb index ef91d21cf20..3a3e47fd9c0 100644 --- a/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb +++ b/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb @@ -48,18 +48,20 @@ describe Projects::HashedStorage::MigrateRepositoryService do expect(gitlab_shell.exists?(project.repository_storage_path, "#{hashed_storage.disk_path}.git")).to be_falsey expect(gitlab_shell.exists?(project.repository_storage_path, "#{hashed_storage.disk_path}.wiki.git")).to be_falsey + expect(project.repository_read_only?).to be_falsey end context 'when rollback fails' do - before do - from_name = legacy_storage.disk_path - to_name = hashed_storage.disk_path + let(:from_name) { legacy_storage.disk_path } + let(:to_name) { hashed_storage.disk_path } + before do hashed_storage.ensure_storage_path_exists gitlab_shell.mv_repository(project.repository_storage_path, from_name, to_name) end it 'does not try to move nil repository over hashed' do + expect(gitlab_shell).not_to receive(:mv_repository).with(project.repository_storage_path, from_name, to_name) expect_move_repository("#{project.disk_path}.wiki", "#{hashed_storage.disk_path}.wiki") service.execute |