diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /spec/support/helpers/stub_object_storage.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'spec/support/helpers/stub_object_storage.rb')
-rw-r--r-- | spec/support/helpers/stub_object_storage.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/support/helpers/stub_object_storage.rb b/spec/support/helpers/stub_object_storage.rb index 476b7d34ee5..dba3d2b137e 100644 --- a/spec/support/helpers/stub_object_storage.rb +++ b/spec/support/helpers/stub_object_storage.rb @@ -82,13 +82,27 @@ module StubObjectStorage **params) end - def stub_terraform_state_object_storage(uploader = described_class, **params) + def stub_terraform_state_object_storage(**params) stub_object_storage_uploader(config: Gitlab.config.terraform_state.object_store, - uploader: uploader, + uploader: Terraform::VersionedStateUploader, + remote_directory: 'terraform', + **params) + end + + def stub_terraform_state_version_object_storage(**params) + stub_object_storage_uploader(config: Gitlab.config.terraform_state.object_store, + uploader: Terraform::StateUploader, remote_directory: 'terraform', **params) end + def stub_pages_object_storage(uploader = described_class, **params) + stub_object_storage_uploader(config: Gitlab.config.pages.object_store, + uploader: uploader, + remote_directory: 'pages', + **params) + end + def stub_object_storage_multipart_init(endpoint, upload_id = "upload_id") stub_request(:post, %r{\A#{endpoint}tmp/uploads/[a-z0-9-]*\?uploads\z}) .to_return status: 200, body: <<-EOS.strip_heredoc |