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
8aa22e8b
Commit
8aa22e8b
authored
Jun 07, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing spec
parent
4032fe12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
spec/features/projects/ee/geo_clone_instructions_spec.rb
spec/features/projects/ee/geo_clone_instructions_spec.rb
+1
-1
spec/support/stub_artifacts.rb
spec/support/stub_artifacts.rb
+3
-1
spec/uploaders/object_store_uploader_spec.rb
spec/uploaders/object_store_uploader_spec.rb
+5
-8
No files found.
config/initializers/1_settings.rb
View file @
8aa22e8b
...
...
@@ -316,7 +316,7 @@ Settings.artifacts['object_store']['enabled'] = false if Settings.artifacts['obj
Settings
.
artifacts
[
'object_store'
][
'remote_directory'
]
||=
nil
# Convert upload connection settings to use symbol keys, to make Fog happy
if
Settings
.
artifacts
[
'object_store'
][
'connection'
]
Settings
.
artifacts
[
'object_store'
][
'connection'
]
=
Hash
[
Settings
.
artifacts
[
'object_store'
][
'connection'
].
map
{
|
k
,
v
|
[
k
.
to_sym
,
v
]
}]
Settings
.
artifacts
[
'object_store'
][
'connection'
]
.
deep_symbolize_keys!
end
#
...
...
spec/features/projects/ee/geo_clone_instructions_spec.rb
View file @
8aa22e8b
...
...
@@ -75,7 +75,7 @@ feature 'Geo clone instructions', feature: true, js: true do
when
'ssh'
project
.
ssh_url_to_repo
when
'http'
project
.
http_url_to_repo
(
developer
)
project
.
http_url_to_repo
end
end
end
spec/support/stub_artifacts.rb
View file @
8aa22e8b
...
...
@@ -14,11 +14,13 @@ module StubConfiguration
allow_any_instance_of
(
ArtifactUploader
).
to
receive
(
:verify_license!
)
{
true
}
return
unless
enabled
::
Fog
::
Storage
.
new
(
Gitlab
.
config
.
artifacts
.
object_store
.
connection
).
tap
do
|
connection
|
begin
connection
.
directories
.
create
(
key:
'artifacts'
)
rescue
Excon
::
Error
::
Conflict
end
end
if
enabled
end
end
end
spec/uploaders/object_store_uploader_spec.rb
View file @
8aa22e8b
...
...
@@ -95,13 +95,10 @@ describe ObjectStoreUploader do
context
'when migrating to remote storage'
do
let
(
:new_store
)
{
described_class
::
REMOTE_STORE
}
before
do
@current_path
=
uploader
.
path
end
let!
(
current_path
)
{
uploader
.
path
}
it
"file does exist"
do
expect
(
File
.
exist?
(
@
current_path
)).
to
eq
(
true
)
expect
(
File
.
exist?
(
current_path
)).
to
eq
(
true
)
end
context
'when storage is disabled'
do
...
...
@@ -123,13 +120,13 @@ describe ObjectStoreUploader do
subject
expect
(
uploader
.
object_store
).
to
eq
(
new_store
)
expect
(
File
.
exist?
(
@
current_path
)).
to
eq
(
false
)
expect
(
File
.
exist?
(
current_path
)).
to
eq
(
false
)
end
it
"does delete original file"
do
subject
expect
(
File
.
exist?
(
@
current_path
)).
to
eq
(
false
)
expect
(
File
.
exist?
(
current_path
)).
to
eq
(
false
)
end
context
'when subject save fails'
do
...
...
@@ -147,7 +144,7 @@ describe ObjectStoreUploader do
rescue
end
expect
(
File
.
exist?
(
@
current_path
)).
to
eq
(
true
)
expect
(
File
.
exist?
(
current_path
)).
to
eq
(
true
)
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