summaryrefslogtreecommitdiff
path: root/spec/uploaders
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-03 11:27:16 -0700
committerStan Hu <stanhu@gmail.com>2019-07-03 11:27:16 -0700
commit3b924c13460d4afe26c386633241d1362d10e824 (patch)
tree9804733bfdfb03c9b27f7c428121ff2e8531a0e8 /spec/uploaders
parentdb26cddaaae20655776e6fac31b29e67b5edfa2e (diff)
downloadgitlab-ce-3b924c13460d4afe26c386633241d1362d10e824.tar.gz
Fix order-dependent spec failure in appearance_spec.rb
When file_mover_spec.rb ran, it would initialize fog-aws with `Fog::AWS::Storage::Real` service instead of `Fog::AWS::Storage::Mock` because `Fog.mock!` was not called. Ensure that we use `stub_uploads_object_storage` to prevent that from happening. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64083
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/file_mover_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/uploaders/file_mover_spec.rb b/spec/uploaders/file_mover_spec.rb
index a9e03f3d4e5..5ee0a10f38d 100644
--- a/spec/uploaders/file_mover_spec.rb
+++ b/spec/uploaders/file_mover_spec.rb
@@ -85,8 +85,7 @@ describe FileMover do
context 'when tmp uploader is not local storage' do
before do
- allow(PersonalFileUploader).to receive(:object_store_enabled?) { true }
- tmp_uploader.object_store = ObjectStorage::Store::REMOTE
+ stub_uploads_object_storage(uploader: PersonalFileUploader)
allow_any_instance_of(PersonalFileUploader).to receive(:file_storage?) { false }
end