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/gitlab_api_client_spec.rb')
-rw-r--r--spec/lib/container_registry/gitlab_api_client_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/lib/container_registry/gitlab_api_client_spec.rb b/spec/lib/container_registry/gitlab_api_client_spec.rb
index f19bedbda0e..7d78aad8b13 100644
--- a/spec/lib/container_registry/gitlab_api_client_spec.rb
+++ b/spec/lib/container_registry/gitlab_api_client_spec.rb
@@ -307,7 +307,16 @@ RSpec.describe ContainerRegistry::GitlabApiClient do
stub_tags(path, page_size: page_size, status_code: 404)
end
- it { is_expected.to eq({}) }
+ it 'logs an error and returns an empty hash' do
+ expect(Gitlab::ErrorTracking)
+ .to receive(:log_exception).with(
+ instance_of(described_class::UnsuccessfulResponseError),
+ class: described_class.name,
+ url: "/gitlab/v1/repositories/#{path}/tags/list/",
+ status_code: 404
+ )
+ expect(subject).to eq({})
+ end
end
end