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
581a946f
Commit
581a946f
authored
Aug 14, 2018
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6860
parent
e610b41e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
spec/factories/uploads.rb
spec/factories/uploads.rb
+7
-0
spec/lib/gitlab/cleanup/project_uploads_spec.rb
spec/lib/gitlab/cleanup/project_uploads_spec.rb
+2
-0
No files found.
spec/factories/uploads.rb
View file @
581a946f
...
@@ -46,6 +46,13 @@ FactoryBot.define do
...
@@ -46,6 +46,13 @@ FactoryBot.define do
secret
SecureRandom
.
hex
secret
SecureRandom
.
hex
end
end
trait
:favicon_upload
do
model
{
build
(
:appearance
)
}
path
{
File
.
join
(
secret
,
filename
)
}
uploader
"FaviconUploader"
secret
SecureRandom
.
hex
end
trait
:attachment_upload
do
trait
:attachment_upload
do
transient
do
transient
do
mount_point
:attachment
mount_point
:attachment
...
...
spec/lib/gitlab/cleanup/project_uploads_spec.rb
View file @
581a946f
...
@@ -244,9 +244,11 @@ describe Gitlab::Cleanup::ProjectUploads do
...
@@ -244,9 +244,11 @@ describe Gitlab::Cleanup::ProjectUploads do
orphaned1
=
create
(
:upload
,
:personal_snippet_upload
,
:with_file
)
orphaned1
=
create
(
:upload
,
:personal_snippet_upload
,
:with_file
)
orphaned2
=
create
(
:upload
,
:namespace_upload
,
:with_file
)
orphaned2
=
create
(
:upload
,
:namespace_upload
,
:with_file
)
orphaned3
=
create
(
:upload
,
:attachment_upload
,
:with_file
)
orphaned3
=
create
(
:upload
,
:attachment_upload
,
:with_file
)
orphaned4
=
create
(
:upload
,
:favicon_upload
,
:with_file
)
paths
<<
orphaned1
.
absolute_path
paths
<<
orphaned1
.
absolute_path
paths
<<
orphaned2
.
absolute_path
paths
<<
orphaned2
.
absolute_path
paths
<<
orphaned3
.
absolute_path
paths
<<
orphaned3
.
absolute_path
paths
<<
orphaned4
.
absolute_path
Upload
.
delete_all
Upload
.
delete_all
expect
(
logger
).
not_to
receive
(
:info
).
with
(
/move|fix/i
)
expect
(
logger
).
not_to
receive
(
:info
).
with
(
/move|fix/i
)
...
...
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