diff --git a/manifests/server/recovery.pp b/manifests/server/recovery.pp index 8c6a7c24d2..aaf4a0586e 100644 --- a/manifests/server/recovery.pp +++ b/manifests/server/recovery.pp @@ -61,7 +61,7 @@ } # Create the recovery.conf content - concat::fragment { 'recovery.conf': + concat::fragment { "${name}-recovery.conf": target => $target, content => template('postgresql/recovery.conf.erb'), } diff --git a/spec/defines/server/recovery_spec.rb b/spec/defines/server/recovery_spec.rb index e8ab5c9b08..d57158397b 100644 --- a/spec/defines/server/recovery_spec.rb +++ b/spec/defines/server/recovery_spec.rb @@ -29,7 +29,7 @@ class { 'postgresql::server': } end it do - is_expected.to contain_concat__fragment('recovery.conf') + is_expected.to contain_concat__fragment('test-recovery.conf') .with(content: %r{restore_command = 'restore_command'[\n]+recovery_target_timeline = 'recovery_target_timeline'}) end end @@ -100,7 +100,7 @@ class { 'postgresql::server': } end it do - is_expected.to contain_concat__fragment('recovery.conf') + is_expected.to contain_concat__fragment('test-recovery.conf') .with(content: %r{restore_command = 'restore_command'[\n]+archive_cleanup_command = 'archive_cleanup_command'[\n]+recovery_end_command = 'recovery_end_command'[\n]+recovery_target_name = 'recovery_target_name'[\n]+recovery_target_time = 'recovery_target_time'[\n]+recovery_target_xid = 'recovery_target_xid'[\n]+recovery_target_inclusive = true[\n]+recovery_target = 'recovery_target'[\n]+recovery_target_timeline = 'recovery_target_timeline'[\n]+pause_at_recovery_target = true[\n]+standby_mode = on[\n]+primary_conninfo = 'primary_conninfo'[\n]+primary_slot_name = 'primary_slot_name'[\n]+trigger_file = 'trigger_file'[\n]+recovery_min_apply_delay = 0[\n]+}) # rubocop:disable Layout/LineLength end end