diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-27 03:10:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-27 03:10:14 +0300 |
commit | 272c39ac05e0d68444114aed58ef2b44e1af30d6 (patch) | |
tree | 3394fc1ac0d76d9b69fadea0964c13380d48c8e8 /spec/services/update_container_registry_info_service_spec.rb | |
parent | 13272cad0b5e74d26722a227b4965944d65b0e79 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/update_container_registry_info_service_spec.rb')
-rw-r--r-- | spec/services/update_container_registry_info_service_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/services/update_container_registry_info_service_spec.rb b/spec/services/update_container_registry_info_service_spec.rb index 416b08bd04b..59b4537a1d6 100644 --- a/spec/services/update_container_registry_info_service_spec.rb +++ b/spec/services/update_container_registry_info_service_spec.rb @@ -72,13 +72,14 @@ RSpec.describe UpdateContainerRegistryInfoService, feature_category: :container_ expect(application_settings.container_registry_vendor).to be_blank expect(application_settings.container_registry_version).to be_blank expect(application_settings.container_registry_features).to eq([]) + expect(application_settings.container_registry_db_enabled).to be_falsey end end context 'when able to detect the container registry type' do context 'when using the GitLab container registry' do it 'updates application settings accordingly' do - stub_registry_info(vendor: 'gitlab', version: '2.9.1-gitlab', features: %w[a b c]) + stub_registry_info(vendor: 'gitlab', version: '2.9.1-gitlab', features: %w[a b c], db_enabled: true) stub_supports_gitlab_api(true) subject @@ -88,12 +89,13 @@ RSpec.describe UpdateContainerRegistryInfoService, feature_category: :container_ expect(application_settings.container_registry_version).to eq('2.9.1-gitlab') expect(application_settings.container_registry_features) .to match_array(%W[a b c #{ContainerRegistry::GitlabApiClient::REGISTRY_GITLAB_V1_API_FEATURE}]) + expect(application_settings.container_registry_db_enabled).to be_truthy end end context 'when using a third-party container registry' do it 'updates application settings accordingly' do - stub_registry_info(vendor: 'other', version: nil, features: nil) + stub_registry_info(vendor: 'other', version: nil, features: nil, db_enabled: false) stub_supports_gitlab_api(false) subject @@ -102,6 +104,7 @@ RSpec.describe UpdateContainerRegistryInfoService, feature_category: :container_ expect(application_settings.container_registry_vendor).to eq('other') expect(application_settings.container_registry_version).to be_blank expect(application_settings.container_registry_features).to eq([]) + expect(application_settings.container_registry_db_enabled).to be_falsey end end end |