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
ed9e5f23
Commit
ed9e5f23
authored
May 07, 2020
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add repository storage move entity
parent
d3eba34d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
lib/api/entities/project_repository_storage_move.rb
lib/api/entities/project_repository_storage_move.rb
+14
-0
spec/lib/api/entities/project_repository_storage_move_spec.rb
.../lib/api/entities/project_repository_storage_move_spec.rb
+21
-0
No files found.
lib/api/entities/project_repository_storage_move.rb
0 → 100644
View file @
ed9e5f23
# frozen_string_literal: true
module
API
module
Entities
class
ProjectRepositoryStorageMove
<
Grape
::
Entity
expose
:id
expose
:created_at
expose
:human_state_name
,
as: :state
expose
:source_storage_name
expose
:destination_storage_name
expose
:project
,
using:
Entities
::
ProjectIdentity
end
end
end
spec/lib/api/entities/project_repository_storage_move_spec.rb
0 → 100644
View file @
ed9e5f23
# frozen_string_literal: true
require
'spec_helper'
describe
API
::
Entities
::
ProjectRepositoryStorageMove
do
describe
'#as_json'
do
subject
{
entity
.
as_json
}
let
(
:storage_move
)
{
build
(
:project_repository_storage_move
,
:scheduled
,
destination_storage_name:
'test_second_storage'
)
}
let
(
:entity
)
{
described_class
.
new
(
storage_move
)
}
it
'includes basic fields'
do
is_expected
.
to
include
(
state:
'scheduled'
,
source_storage_name:
'default'
,
destination_storage_name:
'test_second_storage'
,
project:
a_kind_of
(
Hash
)
)
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