Commit 753c0358 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'sh-add-object-storage-error-context' into 'master'

Add context to object storage error message

See merge request gitlab-org/gitlab!27424
parents bff2c004 8bda5ba4
......@@ -394,7 +394,7 @@ module ObjectStorage
def storage_for(store)
case store
when Store::REMOTE
raise 'Object Storage is not enabled' unless self.class.object_store_enabled?
raise "Object Storage is not enabled for #{self.class}" unless self.class.object_store_enabled?
CarrierWave::Storage::Fog.new(self)
when Store::LOCAL
......
......@@ -272,7 +272,7 @@ describe ObjectStorage do
end
it "to raise an error" do
expect { subject }.to raise_error(/Object Storage is not enabled/)
expect { subject }.to raise_error(/Object Storage is not enabled for JobArtifactUploader/)
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