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
Léo-Paul Géneau
gitlab-ce
Commits
2dc2bad6
Commit
2dc2bad6
authored
Feb 14, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code based on feedback
parent
e613d777
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
doc/api/project_import_export.md
doc/api/project_import_export.md
+1
-1
spec/requests/api/project_import_spec.rb
spec/requests/api/project_import_spec.rb
+2
-2
No files found.
doc/api/project_import_export.md
View file @
2dc2bad6
...
@@ -22,7 +22,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded
...
@@ -22,7 +22,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded
by
`@`
. For example:
by
`@`
. For example:
```
console
```
console
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -
F "path=api-project" -F
"file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -
-form "path=api-project" --form
"file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import
```
```
```
json
```
json
...
...
spec/requests/api/project_import_spec.rb
View file @
2dc2bad6
...
@@ -17,7 +17,7 @@ describe API::ProjectImport do
...
@@ -17,7 +17,7 @@ describe API::ProjectImport do
describe
'POST /projects/import'
do
describe
'POST /projects/import'
do
it
'schedules an import using a namespace'
do
it
'schedules an import using a namespace'
do
stub_import
(
user
.
namespace
)
stub_import
(
namespace
)
post
api
(
'/projects/import'
,
user
),
path:
'test-import'
,
file:
fixture_file_upload
(
file
),
namespace:
namespace
.
id
post
api
(
'/projects/import'
,
user
),
path:
'test-import'
,
file:
fixture_file_upload
(
file
),
namespace:
namespace
.
id
...
@@ -25,7 +25,7 @@ describe API::ProjectImport do
...
@@ -25,7 +25,7 @@ describe API::ProjectImport do
end
end
it
'schedules an import using the namespace path'
do
it
'schedules an import using the namespace path'
do
stub_import
(
u
namespace
)
stub_import
(
namespace
)
post
api
(
'/projects/import'
,
user
),
path:
'test-import'
,
file:
fixture_file_upload
(
file
),
namespace:
namespace
.
full_path
post
api
(
'/projects/import'
,
user
),
path:
'test-import'
,
file:
fixture_file_upload
(
file
),
namespace:
namespace
.
full_path
...
...
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