BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
848f4980
Unverified
Commit
848f4980
authored
Feb 12, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add entity and update spec
parent
de3edb71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
api.rb
lib/api/api.rb
+1
-0
entities.rb
lib/api/entities.rb
+5
-0
project_import_spec.rb
spec/requests/api/project_import_spec.rb
+2
-2
No files found.
lib/api/api.rb
View file @
848f4980
...
...
@@ -138,6 +138,7 @@ module API
mount
::
API
::
PagesDomains
mount
::
API
::
Pipelines
mount
::
API
::
PipelineSchedules
mount
::
API
::
ProjectImport
mount
::
API
::
ProjectHooks
mount
::
API
::
Projects
mount
::
API
::
ProjectMilestones
...
...
lib/api/entities.rb
View file @
848f4980
...
...
@@ -90,6 +90,11 @@ module API
expose
:created_at
end
class
ProjectImportStatus
<
ProjectIdentity
expose
:import_status
expose
:import_error
,
if: :import_error
end
class
BasicProjectDetails
<
ProjectIdentity
include
::
API
::
ProjectsRelationBuilder
...
...
spec/requests/api/project_import_spec.rb
View file @
848f4980
...
...
@@ -33,7 +33,7 @@ describe API::ProjectImport do
get
api
(
"/projects/
#{
project
.
id
}
/import"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
eq
(
'import_status'
=>
'started'
)
expect
(
json_response
).
to
include
(
'import_status'
=>
'started'
)
end
it
'returns the import status and the error if failed'
do
...
...
@@ -42,7 +42,7 @@ describe API::ProjectImport do
get
api
(
"/projects/
#{
project
.
id
}
/import"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
eq
(
'import_status'
=>
'failed'
,
expect
(
json_response
).
to
include
(
'import_status'
=>
'failed'
,
'import_error'
=>
'error'
)
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