diff options
Diffstat (limited to 'spec/services/projects/container_repository/gitlab/cleanup_tags_service_spec.rb')
-rw-r--r-- | spec/services/projects/container_repository/gitlab/cleanup_tags_service_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/projects/container_repository/gitlab/cleanup_tags_service_spec.rb b/spec/services/projects/container_repository/gitlab/cleanup_tags_service_spec.rb index 59827ea035e..b06a5709bd5 100644 --- a/spec/services/projects/container_repository/gitlab/cleanup_tags_service_spec.rb +++ b/spec/services/projects/container_repository/gitlab/cleanup_tags_service_spec.rb @@ -49,6 +49,9 @@ RSpec.describe Projects::ContainerRepository::Gitlab::CleanupTagsService do it_behaves_like 'when regex matching everything is specified', delete_expectations: [%w[A], %w[Ba Bb], %w[C D], %w[E]] + it_behaves_like 'when regex matching everything is specified and latest is not kept', + delete_expectations: [%w[latest A], %w[Ba Bb], %w[C D], %w[E]] + it_behaves_like 'when delete regex matching specific tags is used' it_behaves_like 'when delete regex matching specific tags is used with overriding allow regex' @@ -97,6 +100,19 @@ RSpec.describe Projects::ContainerRepository::Gitlab::CleanupTagsService do is_expected.to eq(response) end + + context 'when disable_timeout is set to true' do + let(:params) do + { 'name_regex_delete' => '.*', 'disable_timeout' => true } + end + + it 'does not check if it timed out' do + expect(service).not_to receive(:timeout?) + end + + it_behaves_like 'when regex matching everything is specified', + delete_expectations: [%w[A], %w[Ba Bb], %w[C D], %w[E]] + end end end |