Skip to content

Ensure multiple postgresql::server::recovery resources can be defined #1348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/server/recovery.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
}
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/server/recovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down