diff --git a/manifests/config.pp b/manifests/config.pp index 107d27506..b89f76226 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -12,6 +12,7 @@ } else { include redis $dynflow_redis_url = "redis://localhost:${redis::port}/6" + Class['redis'] -> Service <| tag == 'foreman::dynflow::worker' |> } file { '/etc/foreman/dynflow': diff --git a/spec/classes/foreman_spec.rb b/spec/classes/foreman_spec.rb index eaa4705b1..0ebc5b610 100644 --- a/spec/classes/foreman_spec.rb +++ b/spec/classes/foreman_spec.rb @@ -149,8 +149,8 @@ # service it { should contain_class('foreman::service') } it { should contain_service('foreman') } - it { is_expected.to contain_service('dynflow-sidekiq@orchestrator').with_ensure('running').with_enable(true) } - it { is_expected.to contain_service('dynflow-sidekiq@worker-1').with_ensure('running').with_enable(true) } + it { is_expected.to contain_service('dynflow-sidekiq@orchestrator').with_ensure('running').with_enable(true).that_requires('Class[redis]') } + it { is_expected.to contain_service('dynflow-sidekiq@worker-1').with_ensure('running').with_enable(true).that_requires('Class[redis]') } # settings it { should contain_class('foreman::settings').that_requires('Class[foreman::database]') }