Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-03 00:09:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-03 00:09:03 +0300
commit03cd2a56f32310def67fefdc34797833a5daf770 (patch)
tree1cefc8769ffc7752183cab6dd9974e259295324d /spec/uploaders
parent983f6954d19f269a059aab1754568737d9ab6f64 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/job_artifact_uploader_spec.rb2
-rw-r--r--spec/uploaders/object_storage/cdn_spec.rb27
2 files changed, 6 insertions, 23 deletions
diff --git a/spec/uploaders/job_artifact_uploader_spec.rb b/spec/uploaders/job_artifact_uploader_spec.rb
index a7fd040837f..d7c9ef7e0d5 100644
--- a/spec/uploaders/job_artifact_uploader_spec.rb
+++ b/spec/uploaders/job_artifact_uploader_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe JobArtifactUploader do
describe '#cdn_enabled_url' do
it 'returns URL and false' do
- result = uploader.cdn_enabled_url(nil, '127.0.0.1')
+ result = uploader.cdn_enabled_url('127.0.0.1')
expect(result.used_cdn).to be false
end
diff --git a/spec/uploaders/object_storage/cdn_spec.rb b/spec/uploaders/object_storage/cdn_spec.rb
index f99450b274f..2a447921a19 100644
--- a/spec/uploaders/object_storage/cdn_spec.rb
+++ b/spec/uploaders/object_storage/cdn_spec.rb
@@ -44,30 +44,13 @@ RSpec.describe ObjectStorage::CDN do
end
describe '#cdn_enabled_url' do
- context 'with ci_job_artifacts_cdn feature flag disabled' do
- before do
- stub_feature_flags(ci_job_artifacts_cdn: false)
- end
-
- it 'calls #url' do
- expect(subject).to receive(:url).and_call_original
- expect(subject).not_to receive(:cdn_signed_url)
-
- result = subject.cdn_enabled_url(project, public_ip)
-
- expect(result.used_cdn).to be false
- end
- end
+ it 'calls #cdn_signed_url' do
+ expect(subject).not_to receive(:url)
+ expect(subject).to receive(:cdn_signed_url).and_call_original
- context 'with ci_job_artifacts_cdn feature flag enabled' do
- it 'calls #cdn_signed_url' do
- expect(subject).not_to receive(:url)
- expect(subject).to receive(:cdn_signed_url).and_call_original
+ result = subject.cdn_enabled_url(public_ip)
- result = subject.cdn_enabled_url(project, public_ip)
-
- expect(result.used_cdn).to be true
- end
+ expect(result.used_cdn).to be true
end
end