From 5a908aff6fe2932cab9df26b2f84ba5ca121bbaa Mon Sep 17 00:00:00 2001 From: Suraj Tripathi <stripathi@gitlab.com> Date: Mon, 22 Aug 2022 17:42:18 +0530 Subject: [PATCH] Added lowercase to the actual con-reg api call Changelog: fixed --- lib/container_registry/gitlab_api_client.rb | 2 +- spec/lib/container_registry/gitlab_api_client_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/container_registry/gitlab_api_client.rb b/lib/container_registry/gitlab_api_client.rb index be99fa75ffeee..2947dcb4b402a 100644 --- a/lib/container_registry/gitlab_api_client.rb +++ b/lib/container_registry/gitlab_api_client.rb @@ -31,7 +31,7 @@ def self.supports_gitlab_api? def self.deduplicated_size(path) with_dummy_client(token_config: { type: :nested_repositories_token, path: path&.downcase }) do |client| - client.repository_details(path, sizing: :self_with_descendants)['size_bytes'] + client.repository_details(path&.downcase, sizing: :self_with_descendants)['size_bytes'] end end diff --git a/spec/lib/container_registry/gitlab_api_client_spec.rb b/spec/lib/container_registry/gitlab_api_client_spec.rb index 7836d8706f654..8cb1700e64405 100644 --- a/spec/lib/container_registry/gitlab_api_client_spec.rb +++ b/spec/lib/container_registry/gitlab_api_client_spec.rb @@ -421,7 +421,7 @@ before do expect(Auth::ContainerRegistryAuthenticationService).to receive(:pull_nested_repositories_access_token).with(path.downcase).and_return(token) - stub_repository_details(path, sizing: :self_with_descendants, status_code: 200, respond_with: response) + stub_repository_details(path.downcase, sizing: :self_with_descendants, status_code: 200, respond_with: response) end it { is_expected.to eq(555) } -- GitLab