Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-07-19 11:55:55 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-07-19 16:19:45 +0300
commita53a4a4309c3aa5cee0ad5f028d9a6255ec5d59e (patch)
tree96f4712b0edb0220cb68e04bf7b22a101f43d5a8 /spec/migrations
parentcfbb256b8b755e84f8156bc01bc1ba278eeaafa9 (diff)
Remove direct disk access in RemoveDotGitFromUsernames
Prior to this change, the migration touched the disk path. This has been removed. Further, I believe it also fixes a bug. It seems that GitLab Shell checks if the root path exists, when the path is duplicated. For example, if the shard is located at /home/git, it did check if `/home/git/home/git` existed.
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/migrate_process_commit_worker_jobs_spec.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/migrations/migrate_process_commit_worker_jobs_spec.rb b/spec/migrations/migrate_process_commit_worker_jobs_spec.rb
index bbb591281d5..6219a67c900 100644
--- a/spec/migrations/migrate_process_commit_worker_jobs_spec.rb
+++ b/spec/migrations/migrate_process_commit_worker_jobs_spec.rb
@@ -27,7 +27,7 @@ describe MigrateProcessCommitWorkerJobs do
end
describe '#repository' do
- it 'returns a Rugged::Repository' do
+ it 'returns a mock implemention of ::Repository' do
migration_project = described_class::Project
.find_including_path(project.id)
@@ -83,11 +83,7 @@ describe MigrateProcessCommitWorkerJobs do
end
it 'encodes data to UTF-8' do
- allow_any_instance_of(Rugged::Repository).to receive(:lookup)
- .with(commit.id)
- .and_return(commit)
-
- allow(commit).to receive(:message)
+ allow(commit).to receive(:body)
.and_return('김치'.force_encoding('BINARY'))
migration.up