BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
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
allow
(
Gitlab
.
config
.
backup
).
to
receive_messages
(
to_settings
(
messages
))
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
# 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