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
3138d6bf
Commit
3138d6bf
authored
Mar 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
82781659
1b74d8bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
.gitlab/issue_templates/Test plan.md
.gitlab/issue_templates/Test plan.md
+1
-1
lib/backup/uploads.rb
lib/backup/uploads.rb
+1
-1
spec/lib/backup/uploads_spec.rb
spec/lib/backup/uploads_spec.rb
+18
-0
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+1
-3
No files found.
.gitlab/issue_templates/Test plan.md
View file @
3138d6bf
...
...
@@ -93,4 +93,4 @@ When adding new automated tests, please keep [testing levels](https://docs.gitla
in mind.
-->
/label ~Quality ~"test
plan"
/label ~Quality ~"test
\-
plan"
lib/backup/uploads.rb
View file @
3138d6bf
...
...
@@ -9,7 +9,7 @@ module Backup
def
initialize
(
progress
)
@progress
=
progress
super
(
'uploads'
,
Rails
.
root
.
join
(
'public/uploads'
))
super
(
'uploads'
,
File
.
join
(
Gitlab
.
config
.
uploads
.
storage_path
,
"uploads"
))
end
end
end
spec/lib/backup/uploads_spec.rb
0 → 100644
View file @
3138d6bf
require
'spec_helper'
describe
Backup
::
Uploads
do
let
(
:progress
)
{
StringIO
.
new
}
subject
(
:backup
)
{
described_class
.
new
(
progress
)
}
describe
'#initialize'
do
it
'uses the correct upload dir'
do
Dir
.
mktmpdir
do
|
tmpdir
|
FileUtils
.
mkdir_p
(
"
#{
tmpdir
}
/uploads"
)
allow
(
Gitlab
.
config
.
uploads
).
to
receive
(
:storage_path
)
{
tmpdir
}
expect
(
backup
.
app_files_dir
).
to
eq
(
"
#{
tmpdir
}
/uploads"
)
end
end
end
end
spec/tasks/gitlab/backup_rake_spec.rb
View file @
3138d6bf
...
...
@@ -21,9 +21,6 @@ describe 'gitlab:app namespace rake task' do
# empty task as env is already loaded
Rake
::
Task
.
define_task
:environment
# We need this directory to run `gitlab:backup:create` task
FileUtils
.
mkdir_p
(
'public/uploads'
)
end
before
do
...
...
@@ -38,6 +35,7 @@ describe 'gitlab:app namespace rake task' do
end
def
run_rake_task
(
task_name
)
FileUtils
.
mkdir_p
(
'tmp/tests/public/uploads'
)
Rake
::
Task
[
task_name
].
reenable
Rake
.
application
.
invoke_task
task_name
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