Skip to content

Commit e2734e5

Browse files
committed
(maint) mock structured facts
we recently switched apt back to the params pattern and it now uses structured facts. since postgres includes apt, some postgres tests needed to have structured facts mocked out because most of the tests still use legacy facts. the mocking gets redundant and we should make an effor to go in at some point and switch postgres to structured facts completely but this works for now.
1 parent 0210bb0 commit e2734e5

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

spec/unit/classes/globals_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
context 'on a debian 6' do
55
let (:facts) do
66
{
7+
:os => {
8+
:family => 'Debian',
9+
:name => 'Debian',
10+
:release => {
11+
:full => '6.0'
12+
}
13+
},
714
:osfamily => 'Debian',
815
:operatingsystem => 'Debian',
916
:operatingsystemrelease => '6.0',

spec/unit/classes/repo_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
describe 'postgresql::repo', :type => :class do
44
let :facts do
55
{
6+
:os => {
7+
:name => 'Debian',
8+
:family => 'Debian',
9+
:release => {
10+
:full => '6.0'
11+
}
12+
},
613
:osfamily => 'Debian',
714
:operatingsystem => 'Debian',
815
:operatingsystemrelease => '6.0',

spec/unit/classes/server_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
describe 'postgresql::server', :type => :class do
44
let :facts do
55
{
6+
:os => {
7+
:family => 'Debian',
8+
:name => 'Debian',
9+
:release => {
10+
:full => '6.0'
11+
}
12+
},
613
:osfamily => 'Debian',
714
:operatingsystem => 'Debian',
815
:lsbdistid => 'Debian',

0 commit comments

Comments
 (0)