Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions spec/spec_helper_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def param(type, title, param)
param_value(catalogue, type, title, param)
end

def postgresql_version
'9.6'
end

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function does not seem to be used in the rest of the changes of this PR. Was it added by mistake?

shared_examples 'postgresql_password function' do
it { is_expected.not_to eq(nil) }

Expand Down
8 changes: 4 additions & 4 deletions spec/unit/classes/server/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
end

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

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

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

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

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

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

it 'has SELinux port defined' do
is_expected.to contain_package('policycoreutils') .with(ensure: 'present')
is_expected.to contain_package('policycoreutils').with(ensure: 'installed')

is_expected.to contain_exec('/usr/sbin/semanage port -a -t postgresql_port_t -p tcp 5432')
.with(unless: '/usr/sbin/semanage port -l | grep -qw 5432')
Expand Down
1 change: 0 additions & 1 deletion spec/unit/defines/server/default_privileges_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'spec_helper'
require 'spec_helper_acceptance'

describe 'postgresql::server::default_privileges', type: :define do
let :facts do
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/defines/server/extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

it {
is_expected.to contain_package('postgis')
.with(ensure: 'present', name: 'postgis').that_comes_before('Postgresql_psql[template_postgis: CREATE EXTENSION "postgis"]')
.with(ensure: 'installed', name: 'postgis').that_comes_before('Postgresql_psql[template_postgis: CREATE EXTENSION "postgis"]')
}
end

Expand Down Expand Up @@ -86,7 +86,7 @@

it {
is_expected.to contain_package('postgis')
.with(ensure: 'present', name: 'postgis').that_requires('Postgresql_psql[template_postgis: DROP EXTENSION "postgis"]')
.with(ensure: 'installed', name: 'postgis').that_requires('Postgresql_psql[template_postgis: DROP EXTENSION "postgis"]')
}
end
end
Expand Down