From fcd0a0d91e848655ed0abff558a3341cd2c6b98f Mon Sep 17 00:00:00 2001 From: highpingblorg Date: Tue, 22 Oct 2024 11:38:55 +0200 Subject: [PATCH] Add test for modifying the dynflow sidekiq service file Fixes GH-1191 --- spec/classes/foreman_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/classes/foreman_spec.rb b/spec/classes/foreman_spec.rb index 35e4a2d65..43cc8cfc3 100644 --- a/spec/classes/foreman_spec.rb +++ b/spec/classes/foreman_spec.rb @@ -472,6 +472,24 @@ end end + describe 'with custom redis for dynflow' do + context 'with redis_url for dynflow' do + let(:params) do + super().merge( + dynflow_redis_url: 'redis://127.0.0.1:6379/7', + rails_cache_store: {type: 'file'} + ) + end + + it { should_not contain_class('redis') } + it { should_not contain_class('redis::instance') } + it do + is_expected.to contain_file('/usr/lib/systemd/system/dynflow-sidekiq@.service') + .with_content(/^.*redis:\/\/127\.0\.0\.1:6379\/7.*$/) + end + end + end + describe 'with non-Puppet SSL certificates' do let(:params) do super().merge(