Commit 3b924c13 authored by Stan Hu's avatar Stan Hu

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
parent db26cdda
...@@ -21,7 +21,7 @@ describe Appearance do ...@@ -21,7 +21,7 @@ describe Appearance do
end end
end end
context 'with uploads', :quarantine do context 'with uploads' do
it_behaves_like 'model with uploads', false do it_behaves_like 'model with uploads', false do
let(:model_object) { create(:appearance, :with_logo) } let(:model_object) { create(:appearance, :with_logo) }
let(:upload_attribute) { :logo } let(:upload_attribute) { :logo }
......
...@@ -85,8 +85,7 @@ describe FileMover do ...@@ -85,8 +85,7 @@ describe FileMover do
context 'when tmp uploader is not local storage' do context 'when tmp uploader is not local storage' do
before do before do
allow(PersonalFileUploader).to receive(:object_store_enabled?) { true } stub_uploads_object_storage(uploader: PersonalFileUploader)
tmp_uploader.object_store = ObjectStorage::Store::REMOTE
allow_any_instance_of(PersonalFileUploader).to receive(:file_storage?) { false } allow_any_instance_of(PersonalFileUploader).to receive(:file_storage?) { false }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment