Skip to content

Commit c8303fd

Browse files
adrianiurcaekohl
authored andcommitted
Reflect change of default in ensure_packages
puppetlabs/puppetlabs-stdlib@77a9c07 changed the default for ensure_packages() in stdlib. This change updates the tests to match that default change.
1 parent 7f3ac0c commit c8303fd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

spec/unit/classes/server/config_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
end
3333

3434
it 'has SELinux port defined' do
35-
is_expected.to contain_package('policycoreutils-python') .with(ensure: 'present')
35+
is_expected.to contain_package('policycoreutils-python').with(ensure: 'installed')
3636

3737
is_expected.to contain_exec('/usr/sbin/semanage port -a -t postgresql_port_t -p tcp 5432')
3838
.with(unless: '/usr/sbin/semanage port -l | grep -qw 5432')
@@ -141,7 +141,7 @@ class { 'postgresql::server': }
141141
end
142142

143143
it 'has SELinux port defined' do
144-
is_expected.to contain_package('policycoreutils-python-utils') .with(ensure: 'present')
144+
is_expected.to contain_package('policycoreutils-python-utils').with(ensure: 'installed')
145145

146146
is_expected.to contain_exec('/usr/sbin/semanage port -a -t postgresql_port_t -p tcp 5432')
147147
.with(unless: '/usr/sbin/semanage port -l | grep -qw 5432')
@@ -214,7 +214,7 @@ class { 'postgresql::server': }
214214
end
215215

216216
it 'has SELinux port defined' do
217-
is_expected.to contain_package('policycoreutils-python-utils') .with(ensure: 'present')
217+
is_expected.to contain_package('policycoreutils-python-utils').with(ensure: 'installed')
218218

219219
is_expected.to contain_exec('/usr/sbin/semanage port -a -t postgresql_port_t -p tcp 5432')
220220
.with(unless: '/usr/sbin/semanage port -l | grep -qw 5432')
@@ -282,7 +282,7 @@ class { 'postgresql::server': }
282282
end
283283

284284
it 'has SELinux port defined' do
285-
is_expected.to contain_package('policycoreutils') .with(ensure: 'present')
285+
is_expected.to contain_package('policycoreutils').with(ensure: 'installed')
286286

287287
is_expected.to contain_exec('/usr/sbin/semanage port -a -t postgresql_port_t -p tcp 5432')
288288
.with(unless: '/usr/sbin/semanage port -l | grep -qw 5432')

spec/unit/defines/server/extension_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
it {
5656
is_expected.to contain_package('postgis')
57-
.with(ensure: 'present', name: 'postgis').that_comes_before('Postgresql_psql[template_postgis: CREATE EXTENSION "postgis"]')
57+
.with(ensure: 'installed', name: 'postgis').that_comes_before('Postgresql_psql[template_postgis: CREATE EXTENSION "postgis"]')
5858
}
5959
end
6060

@@ -86,7 +86,7 @@
8686

8787
it {
8888
is_expected.to contain_package('postgis')
89-
.with(ensure: 'present', name: 'postgis').that_requires('Postgresql_psql[template_postgis: DROP EXTENSION "postgis"]')
89+
.with(ensure: 'installed', name: 'postgis').that_requires('Postgresql_psql[template_postgis: DROP EXTENSION "postgis"]')
9090
}
9191
end
9292
end

0 commit comments

Comments
 (0)