Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
f1eaab7b
Commit
f1eaab7b
authored
Dec 10, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the need for destroy and add a comment in the spec
parent
86661a3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
spec/lib/gitlab/bare_repository_import/importer_spec.rb
spec/lib/gitlab/bare_repository_import/importer_spec.rb
+3
-4
No files found.
spec/lib/gitlab/bare_repository_import/importer_spec.rb
View file @
f1eaab7b
...
...
@@ -134,12 +134,11 @@ describe Gitlab::BareRepositoryImport::Importer, repository: true do
end
it
'moves an existing project to the correct path'
do
# This is a quick way to get a valid repository instead of copying an existing one
# This is a quick way to get a valid repository instead of copying an
# existing one. Since it's not persisted, the importer will try to
# create the project.
project
=
build
(
:project
,
:repository
)
original_commit_count
=
project
.
repository
.
commit_count
# We need to destroy the model but keep the repository so that the
# importer will attempt to load the repository
project
.
destroy
bare_repo
=
Gitlab
::
BareRepositoryImport
::
Repository
.
new
(
project
.
repository_storage_path
,
project
.
repository
.
path
)
gitlab_importer
=
described_class
.
new
(
admin
,
bare_repo
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment