diff options
author | Nick Thomas <nick@gitlab.com> | 2019-01-09 17:01:28 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-02-05 14:12:48 +0000 |
commit | f9e41d0d851ae0ab1d67df63d0309fdce97517e1 (patch) | |
tree | 3c71a5853b789ff57d8a47522d8603c36eb7aa59 /spec/support/helpers | |
parent | f04910f254c29047dd3ae798161683a722e7162b (diff) | |
download | gitlab-ce-f9e41d0d851ae0ab1d67df63d0309fdce97517e1.tar.gz |
Allow MR diffs to be placed into an object store
Diffstat (limited to 'spec/support/helpers')
-rw-r--r-- | spec/support/helpers/stub_configuration.rb | 4 | ||||
-rw-r--r-- | spec/support/helpers/stub_object_storage.rb | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/helpers/stub_configuration.rb b/spec/support/helpers/stub_configuration.rb index 2851cd9733c..ff21bbe28ca 100644 --- a/spec/support/helpers/stub_configuration.rb +++ b/spec/support/helpers/stub_configuration.rb @@ -56,6 +56,10 @@ module StubConfiguration allow(Gitlab.config.lfs).to receive_messages(to_settings(messages)) end + def stub_external_diffs_setting(messages) + allow(Gitlab.config.external_diffs).to receive_messages(to_settings(messages)) + end + def stub_artifacts_setting(messages) allow(Gitlab.config.artifacts).to receive_messages(to_settings(messages)) end diff --git a/spec/support/helpers/stub_object_storage.rb b/spec/support/helpers/stub_object_storage.rb index 58b5c6a6435..e0c50e533a6 100644 --- a/spec/support/helpers/stub_object_storage.rb +++ b/spec/support/helpers/stub_object_storage.rb @@ -42,6 +42,13 @@ module StubObjectStorage **params) end + def stub_external_diffs_object_storage(uploader = described_class, **params) + stub_object_storage_uploader(config: Gitlab.config.external_diffs.object_store, + uploader: uploader, + remote_directory: 'external_diffs', + **params) + end + def stub_lfs_object_storage(**params) stub_object_storage_uploader(config: Gitlab.config.lfs.object_store, uploader: LfsObjectUploader, |