File tree Expand file tree Collapse file tree 3 files changed +40
-9
lines changed Expand file tree Collapse file tree 3 files changed +40
-9
lines changed Original file line number Diff line number Diff line change
1
+ # @param service_reload Overrides the default reload command for your PostgreSQL service.
2
+ # @param service_status Overrides the default status check command for your PostgreSQL service.
3
+ define postgresql::server::instance_reload (
4
+ $service_status = $postgresql::server::service_status,
5
+ $service_reload = $postgresql::server::service_reload,
6
+ ) {
7
+ exec { 'postgresql_reload' :
8
+ path => ' /usr/bin:/usr/sbin:/bin:/sbin' ,
9
+ command => $service_reload ,
10
+ onlyif => $service_status ,
11
+ refreshonly => true ,
12
+ require => Class[' postgresql::server::service' ],
13
+ }
14
+ }
Original file line number Diff line number Diff line change 1
1
# @api private
2
2
class postgresql::server::reload {
3
- $service_status = $postgresql::server::service_status
4
- $service_reload = $postgresql::server::service_reload
5
-
6
- exec { 'postgresql_reload' :
7
- path => ' /usr/bin:/usr/sbin:/bin:/sbin' ,
8
- command => $service_reload ,
9
- onlyif => $service_status ,
10
- refreshonly => true ,
11
- require => Class[' postgresql::server::service' ],
3
+ postgresql::server::instance_reload { 'main' :
4
+ service_status => $postgresql::server::service_status ,
5
+ service_reload => $postgresql::server::service_reload ,
12
6
}
13
7
}
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'postgresql::server::instance_reload' do
6
+ let ( :title ) { 'main' }
7
+
8
+ on_supported_os . each do |os , os_facts |
9
+ context "on #{ os } " do
10
+ let :facts do
11
+ os_facts
12
+ end
13
+
14
+ let :pre_condition do
15
+ "class {'postgresql::server':}"
16
+ end
17
+
18
+ context 'with defaults from server class' do
19
+ it { is_expected . to compile . with_all_deps }
20
+ end
21
+ end
22
+ end
23
+ end
You can’t perform that action at this time.
0 commit comments