From fef0544a51b41e7a4975d489c3ccacde761ff5fd Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Wed, 4 Oct 2023 20:42:06 -0400 Subject: [PATCH] Fixes #36801: Make Redis the default cache type --- manifests/init.pp | 2 +- spec/classes/foreman_spec.rb | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index c95f3d43d..08d901d38 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -296,7 +296,7 @@ Optional[Integer[0]] $foreman_service_puma_threads_min = undef, Integer[0] $foreman_service_puma_threads_max = 5, Optional[Integer[0]] $foreman_service_puma_workers = undef, - Hash[String, Any] $rails_cache_store = { 'type' => 'file' }, + Hash[String, Any] $rails_cache_store = { 'type' => 'redis' }, Boolean $keycloak = false, String[1] $keycloak_app_name = 'foreman-openidc', String[1] $keycloak_realm = 'ssl-realm', diff --git a/spec/classes/foreman_spec.rb b/spec/classes/foreman_spec.rb index e3f6aa47b..33379d5d4 100644 --- a/spec/classes/foreman_spec.rb +++ b/spec/classes/foreman_spec.rb @@ -458,7 +458,13 @@ describe 'with custom redis' do context 'with redis_url' do - let(:params) { super().merge(dynflow_redis_url: 'redis://127.0.0.1:4333/') } + let(:params) do + super().merge( + dynflow_redis_url: 'redis://127.0.0.1:4333/', + rails_cache_store: {type: 'redis', 'urls': ['127.0.0.1:4334']} + ) + end + it { should_not contain_class('redis') } it { should_not contain_class('redis::instance') } end