diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-28 19:54:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-28 19:54:04 +0300 |
commit | 60d9342b3b0dfb6b1fab71e8edff869529dd3794 (patch) | |
tree | 6304809f9949ce4592e3808b92bb5bfbf5dbb1d9 /spec | |
parent | 043c499d369387a8128ca4d7de69dd4ae0f53a38 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-ee
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/content_security_policy/config_loader_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/gitlab/content_security_policy/config_loader_spec.rb b/spec/lib/gitlab/content_security_policy/config_loader_spec.rb index dd633820ad9..6d24ced138e 100644 --- a/spec/lib/gitlab/content_security_policy/config_loader_spec.rb +++ b/spec/lib/gitlab/content_security_policy/config_loader_spec.rb @@ -205,6 +205,24 @@ RSpec.describe Gitlab::ContentSecurityPolicy::ConfigLoader, feature_category: :s context 'when LFS is enabled' do let(:lfs_enabled) { true } + context 'and object storage is not in use' do + let(:lfs_config) do + { + enabled: false, + remote_directory: 'lfs-objects', + connection: {}, + direct_upload: false, + proxy_download: true, + storage_options: {} + } + end + + it 'is expected to be skipped' do + expect(described_class.send(:allow_lfs, directives)).to be_nil + expect(connect_src).not_to include('lfs-objects') + end + end + context 'and direct downloads are enabled' do let(:provider) { LfsObjectUploader.object_store_options.connection.provider } |