Skip to content

Commit e53ff08

Browse files
authored
Merge pull request #1348 from Deroin/allow_multiple_recovery_instances
Ensure multiple postgresql::server::recovery resources can be defined
2 parents 41c57fe + 0944a35 commit e53ff08

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

manifests/server/recovery.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262

6363
# Create the recovery.conf content
64-
concat::fragment { 'recovery.conf':
64+
concat::fragment { "${name}-recovery.conf":
6565
target => $target,
6666
content => template('postgresql/recovery.conf.erb'),
6767
}

spec/defines/server/recovery_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class { 'postgresql::server': }
2929
end
3030

3131
it do
32-
is_expected.to contain_concat__fragment('recovery.conf')
32+
is_expected.to contain_concat__fragment('test-recovery.conf')
3333
.with(content: %r{restore_command = 'restore_command'[\n]+recovery_target_timeline = 'recovery_target_timeline'})
3434
end
3535
end
@@ -100,7 +100,7 @@ class { 'postgresql::server': }
100100
end
101101

102102
it do
103-
is_expected.to contain_concat__fragment('recovery.conf')
103+
is_expected.to contain_concat__fragment('test-recovery.conf')
104104
.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
105105
end
106106
end

0 commit comments

Comments
 (0)