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
02967002
Commit
02967002
authored
Aug 11, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GitalyClient::RepositoryService specs
parent
f0ac0daf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
+63
-0
No files found.
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
0 → 100644
View file @
02967002
require
'spec_helper'
describe
Gitlab
::
GitalyClient
::
RepositoryService
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:storage_name
)
{
project
.
repository_storage
}
let
(
:relative_path
)
{
project
.
disk_path
+
'.git'
}
let
(
:client
)
{
described_class
.
new
(
project
.
repository
)
}
describe
'#exists?'
do
it
'sends a repository_exists message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:repository_exists
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
exists:
true
))
client
.
exists?
end
end
describe
'#garbage_collect'
do
it
'sends a garbage_collect message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:garbage_collect
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
:garbage_collect_response
))
client
.
garbage_collect
(
true
)
end
end
describe
'#repack_full'
do
it
'sends a repack_full message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:repack_full
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
:repack_full_response
))
client
.
repack_full
(
true
)
end
end
describe
'#repack_incremental'
do
it
'sends a repack_incremental message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:repack_incremental
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
:repack_incremental_response
))
client
.
repack_incremental
end
end
describe
'#repository_size'
do
it
'sends a repository_size message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:repository_size
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
size:
0
)
client
.
repository_size
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