File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 5
5
# rubocop:disable RSpec/MultipleMemoizedHelpers
6
6
describe 'rvm' do
7
7
# host variables
8
- let ( :osfamily ) { fact ( 'osfamily ' ) }
9
- let ( :osname ) { fact ( 'operatingsystem ' ) }
10
- let ( :osversion ) { fact ( 'operatingsystemrelease ' ) }
8
+ let ( :osfamily ) { fact ( 'os.family ' ) }
9
+ let ( :osname ) { fact ( 'os.name ' ) }
10
+ let ( :osversion ) { fact ( 'os.release.major ' ) }
11
11
12
12
# rvm config
13
13
let ( :rvm_path ) { '/usr/local/rvm/' }
70
70
# baseline manifest
71
71
let ( :manifest ) do
72
72
<<-EOS
73
- if $::osfamily == 'RedHat' {
73
+ if $facts['os']['familiy'] == 'RedHat' {
74
74
class { 'epel':
75
75
before => Class['rvm'],
76
76
}
Original file line number Diff line number Diff line change 11
11
12
12
it { is_expected . to compile . with_all_deps }
13
13
14
- case os_facts [ :osfamily ]
14
+ case os_facts [ :os ] [ 'family' ]
15
15
when 'RedHat'
16
16
it { is_expected . to contain_package ( 'which' ) }
17
17
it { is_expected . to contain_package ( 'gcc' ) }
Original file line number Diff line number Diff line change 8
8
{
9
9
rvm_version : '1.10.0' ,
10
10
root_home : '/root' ,
11
- osfamily : 'Debian' ,
12
11
os : {
13
12
family : 'Debian'
14
13
}
Original file line number Diff line number Diff line change 16
16
it { is_expected . to contain_user ( username ) }
17
17
it { is_expected . to contain_group ( group ) }
18
18
19
- case os_facts [ :osfamily ]
19
+ case os_facts [ :os ] [ 'family' ]
20
20
when 'FreeBSD'
21
21
it { is_expected . to contain_exec ( "rvm-system-user-#{ username } " ) . with_command ( "/usr/sbin/pw groupmod #{ group } -m #{ username } " ) }
22
22
when 'Darwin'
You can’t perform that action at this time.
0 commit comments