diff options
author | Stan Hu <stanhu@gmail.com> | 2017-09-29 17:20:56 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-09-29 23:19:34 -0700 |
commit | 15a8fdb8142eb6a412f8ef772d742c399e91f12a (patch) | |
tree | 414f1293e6cde8fc210628039fc64d492cea7bd5 /spec/models/project_spec.rb | |
parent | 171714c9231deb95136088ba1c0621379467de39 (diff) | |
download | gitlab-ce-sh-fix-import-repos.tar.gz |
Fix gitlab-rake gitlab:import:repos tasksh-fix-import-repos
Because of a change in GitLab 9.5.4 to prevent users from assuming control of
a repository already on disk, the import task broke. Imports would fail with
the message, "There is already a repository with that name on disk".
This change skips the validation when the import is done from the
command-line.
Closes #37682
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 868a843ab0a..07fad057cd2 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2793,6 +2793,17 @@ describe Project do end end + describe '#can_create_repository?' do + let(:project) { build(:project) } + + it 'skips gitlab-shell exists?' do + project.skip_disk_validation = true + + expect(project.gitlab_shell).not_to receive(:exists?) + expect(project.can_create_repository?).to be_truthy + end + end + describe '#latest_successful_pipeline_for_default_branch' do let(:project) { build(:project) } |