summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-08-15 08:57:25 +0000
committerNick Thomas <nick@gitlab.com>2018-08-15 08:57:25 +0000
commitc87ca8322636db69b6f097336f163d0373bb415e (patch)
treed157d0d8c8f5e4e3cc21d03d8b41920b6052ce66
parentf415b07db4637f2c122b161da23b42ea1ef5d16d (diff)
parent581a946f5a977a500e55d586bfddc36a722fd659 (diff)
downloadgitlab-ce-c87ca8322636db69b6f097336f163d0373bb415e.tar.gz
Merge branch '6541-custom-favicons-not-being-replicated-by-geo' into 'master'
Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6860 See merge request gitlab-org/gitlab-ce!21200
-rw-r--r--spec/factories/uploads.rb7
-rw-r--r--spec/lib/gitlab/cleanup/project_uploads_spec.rb2
2 files changed, 9 insertions, 0 deletions
diff --git a/spec/factories/uploads.rb b/spec/factories/uploads.rb
index a81b2169b89..81c485fba1a 100644
--- a/spec/factories/uploads.rb
+++ b/spec/factories/uploads.rb
@@ -46,6 +46,13 @@ FactoryBot.define do
secret SecureRandom.hex
end
+ trait :favicon_upload do
+ model { build(:appearance) }
+ path { File.join(secret, filename) }
+ uploader "FaviconUploader"
+ secret SecureRandom.hex
+ end
+
trait :attachment_upload do
transient do
mount_point :attachment
diff --git a/spec/lib/gitlab/cleanup/project_uploads_spec.rb b/spec/lib/gitlab/cleanup/project_uploads_spec.rb
index 37b38776775..11e605eece6 100644
--- a/spec/lib/gitlab/cleanup/project_uploads_spec.rb
+++ b/spec/lib/gitlab/cleanup/project_uploads_spec.rb
@@ -244,9 +244,11 @@ describe Gitlab::Cleanup::ProjectUploads do
orphaned1 = create(:upload, :personal_snippet_upload, :with_file)
orphaned2 = create(:upload, :namespace_upload, :with_file)
orphaned3 = create(:upload, :attachment_upload, :with_file)
+ orphaned4 = create(:upload, :favicon_upload, :with_file)
paths << orphaned1.absolute_path
paths << orphaned2.absolute_path
paths << orphaned3.absolute_path
+ paths << orphaned4.absolute_path
Upload.delete_all
expect(logger).not_to receive(:info).with(/move|fix/i)