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:
Diffstat (limited to 'spec/lib/container_registry/client_spec.rb')
-rw-r--r--spec/lib/container_registry/client_spec.rb53
1 files changed, 0 insertions, 53 deletions
diff --git a/spec/lib/container_registry/client_spec.rb b/spec/lib/container_registry/client_spec.rb
index 39a594eba5c..f9e08df3399 100644
--- a/spec/lib/container_registry/client_spec.rb
+++ b/spec/lib/container_registry/client_spec.rb
@@ -199,69 +199,16 @@ RSpec.describe ContainerRegistry::Client do
let(:redirect_location) { 'http://redirect?foo=bar&test=signature=' }
it_behaves_like 'handling redirects'
-
- context 'with container_registry_follow_redirects_middleware disabled' do
- before do
- stub_feature_flags(container_registry_follow_redirects_middleware: false)
- end
-
- it 'follows the redirect' do
- expect(Faraday::Utils).to receive(:escape).with('foo').and_call_original
- expect(Faraday::Utils).to receive(:escape).with('bar').and_call_original
- expect(Faraday::Utils).to receive(:escape).with('test').and_call_original
- expect(Faraday::Utils).to receive(:escape).with('signature=').and_call_original
-
- expect_new_faraday(times: 2)
- expect(subject).to eq('Successfully redirected')
- end
- end
end
context 'with a redirect location with params ending with %3D' do
let(:redirect_location) { 'http://redirect?foo=bar&test=signature%3D' }
it_behaves_like 'handling redirects'
-
- context 'with container_registry_follow_redirects_middleware disabled' do
- before do
- stub_feature_flags(container_registry_follow_redirects_middleware: false)
- end
-
- it 'follows the redirect' do
- expect(Faraday::Utils).to receive(:escape).with('foo').and_call_original
- expect(Faraday::Utils).to receive(:escape).with('bar').and_call_original
- expect(Faraday::Utils).to receive(:escape).with('test').and_call_original
- expect(Faraday::Utils).to receive(:escape).with('signature=').and_call_original
-
- expect_new_faraday(times: 2)
- expect(subject).to eq('Successfully redirected')
- end
- end
end
end
it_behaves_like 'handling timeouts'
-
- # TODO Remove this context along with the
- # container_registry_follow_redirects_middleware feature flag
- # See https://gitlab.com/gitlab-org/gitlab/-/issues/353291
- context 'faraday blob' do
- subject { client.send(:faraday_blob) }
-
- it 'has a follow redirects middleware' do
- expect(subject.builder.handlers).to include(::FaradayMiddleware::FollowRedirects)
- end
-
- context 'with container_registry_follow_redirects_middleware is disabled' do
- before do
- stub_feature_flags(container_registry_follow_redirects_middleware: false)
- end
-
- it 'has not a follow redirects middleware' do
- expect(subject.builder.handlers).not_to include(::FaradayMiddleware::FollowRedirects)
- end
- end
- end
end
describe '#upload_blob' do