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
016522dd
Commit
016522dd
authored
Aug 07, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a helper to stub storage settings with defaults
parent
0ff90166
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
spec/support/stub_configuration.rb
spec/support/stub_configuration.rb
+11
-0
No files found.
spec/support/stub_configuration.rb
View file @
016522dd
...
@@ -38,6 +38,17 @@ module StubConfiguration
...
@@ -38,6 +38,17 @@ module StubConfiguration
allow
(
Gitlab
.
config
.
backup
).
to
receive_messages
(
to_settings
(
messages
))
allow
(
Gitlab
.
config
.
backup
).
to
receive_messages
(
to_settings
(
messages
))
end
end
def
stub_storage_settings
(
messages
)
messages
.
each
do
|
storage_name
,
storage_settings
|
storage_settings
[
'failure_count_threshold'
]
||=
10
storage_settings
[
'failure_wait_time'
]
||=
30
storage_settings
[
'failure_reset_time'
]
||=
1800
storage_settings
[
'storage_timeout'
]
||=
5
end
allow
(
Gitlab
.
config
.
repositories
).
to
receive
(
:storages
).
and_return
(
messages
)
end
private
private
# Modifies stubbed messages to also stub possible predicate versions
# Modifies stubbed messages to also stub possible predicate versions
...
...
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