Skip to content

Commit eadfe3b

Browse files
committed
modified tests
1 parent 165e12d commit eadfe3b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

spec/system/install_spec.rb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,14 @@ class { 'postgresql::server': }
102102
pp = <<-EOS
103103
class { "postgresql::server":
104104
config_hash => {
105-
'postgres_password' => 'TPSReports!',
105+
'postgres_password' => 'TPSReports!',
106+
'ip_mask_deny_postgres_user' => '0.0.0.0/32',
106107
},
107108
}
108109
EOS
109110

110111
puppet_apply(pp) do |r|
111-
r.exit_code.should == 2
112+
[0,2].should include(r.exit_code)
112113
r.stdout.should =~ /\[set_postgres_postgrespw\]\/returns: executed successfully/
113114
end
114115
puppet_apply(pp) do |r|
@@ -118,14 +119,19 @@ class { "postgresql::server":
118119
pp = <<-EOS
119120
class { "postgresql::server":
120121
config_hash => {
121-
'postgres_password' => 'TPSR$$eports!',
122+
'postgres_password' => 'TPSR$$eports!',
123+
'ip_mask_deny_postgres_user' => '0.0.0.0/32',
122124
},
123125
}
124126
EOS
127+
125128
puppet_apply(pp) do |r|
126-
r.exit_code.should == 2
129+
[0,2].should include(r.exit_code)
127130
r.stdout.should =~ /\[set_postgres_postgrespw\]\/returns: executed successfully/
128131
end
132+
puppet_apply(pp) do |r|
133+
r.exit_code.should == 0
134+
end
129135

130136
end
131137
end

0 commit comments

Comments
 (0)