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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d65159e8
Commit
d65159e8
authored
May 25, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added specs to test fix to do with adding an import job getting stuck in started
parent
4cbdd0ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+33
-0
No files found.
spec/models/project_spec.rb
View file @
d65159e8
...
@@ -955,4 +955,37 @@ describe Project, models: true do
...
@@ -955,4 +955,37 @@ describe Project, models: true do
it
{
is_expected
.
to
be_falsey
}
it
{
is_expected
.
to
be_falsey
}
end
end
end
end
describe
'Project import job'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:mirror
)
{
false
}
before
do
allow_any_instance_of
(
Gitlab
::
Shell
).
to
receive
(
:import_repository
).
with
(
project
.
path_with_namespace
,
project
.
import_url
).
and_return
(
true
)
allow
(
project
).
to
receive
(
:repository_exists?
).
and_return
(
true
)
end
it
'imports a project'
do
expect_any_instance_of
(
RepositoryImportWorker
).
to
receive
(
:perform
).
and_call_original
project
.
import_start
project
.
add_import_job
expect
(
project
.
reload
.
import_status
).
to
eq
(
'finished'
)
end
it
'imports a mirrored project'
do
allow_any_instance_of
(
RepositoryUpdateMirrorWorker
).
to
receive
(
:perform
)
expect_any_instance_of
(
RepositoryImportWorker
).
to
receive
(
:perform
).
and_call_original
project
.
import_start
project
.
mirror
=
true
project
.
add_import_job
expect
(
project
.
reload
.
import_status
).
to
eq
(
'finished'
)
end
end
end
end
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