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
fc01042f
Commit
fc01042f
authored
Nov 14, 2017
by
Kim "BKC" Carlbäcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a disable_gitaly flag for specs
parent
7d2a2035
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
spec/services/projects/update_repository_storage_service_spec.rb
...rvices/projects/update_repository_storage_service_spec.rb
+2
-2
spec/support/gitaly.rb
spec/support/gitaly.rb
+2
-1
No files found.
spec/services/projects/update_repository_storage_service_spec.rb
View file @
fc01042f
...
...
@@ -26,7 +26,7 @@ describe Projects::UpdateRepositoryStorageService do
FileUtils
.
rm_rf
(
'tmp/tests/storage_b'
)
end
context
'without wiki'
,
:
skip_gitaly_mock
do
context
'without wiki'
,
:
disable_gitaly
do
let
(
:project
)
{
create
(
:project
,
:repository
,
repository_storage:
'a'
,
repository_read_only:
true
,
wiki_enabled:
false
)
}
context
'when the move succeeds'
do
...
...
@@ -60,7 +60,7 @@ describe Projects::UpdateRepositoryStorageService do
end
end
context
'with wiki'
,
:
skip_gitaly_mock
do
context
'with wiki'
,
:
disable_gitaly
do
let
(
:project
)
{
create
(
:project
,
:repository
,
repository_storage:
'a'
,
repository_read_only:
true
,
wiki_enabled:
true
)
}
let
(
:repository_double
)
{
double
(
:repository
)
}
let
(
:wiki_repository_double
)
{
double
(
:repository
)
}
...
...
spec/support/gitaly.rb
View file @
fc01042f
RSpec
.
configure
do
|
config
|
config
.
before
(
:each
)
do
|
example
|
if
example
.
metadata
[
:
skip_gitaly_mock
]
if
example
.
metadata
[
:
disable_gitaly
]
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:feature_enabled?
).
and_return
(
false
)
else
next
if
example
.
metadata
[
:skip_gitaly_mock
]
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:feature_enabled?
).
and_return
(
true
)
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