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
63d15c83
Commit
63d15c83
authored
Jun 22, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
port stub_object_storage changes
parent
264d770b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
spec/support/helpers/stub_object_storage.rb
spec/support/helpers/stub_object_storage.rb
+6
-1
No files found.
spec/support/helpers/stub_object_storage.rb
View file @
63d15c83
...
...
@@ -15,9 +15,14 @@ module StubObjectStorage
return
unless
enabled
stub_object_storage
(
connection_params:
uploader
.
object_store_credentials
,
remote_directory:
remote_directory
)
end
def
stub_object_storage
(
connection_params
:,
remote_directory
:)
Fog
.
mock!
::
Fog
::
Storage
.
new
(
uploader
.
object_store_credential
s
).
tap
do
|
connection
|
::
Fog
::
Storage
.
new
(
connection_param
s
).
tap
do
|
connection
|
begin
connection
.
directories
.
create
(
key:
remote_directory
)
rescue
Excon
::
Error
::
Conflict
...
...
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