Ensure spec tests for Solaris port pass

This commit is contained in:
Garrett Honeycutt 2014-02-25 10:42:26 +01:00
parent ec878abe2b
commit 94d8fef4bb

View File

@ -127,14 +127,15 @@ describe 'ssh' do
it { should_not include_class('common')} it { should_not include_class('common')}
it { ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'].each do |pkg|
should contain_package('ssh_packages').with({ it {
'ensure' => 'installed', should contain_package(pkg).with({
'name' => ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'], 'ensure' => 'installed',
'source' => '/var/spool/pkg', 'source' => '/var/spool/pkg',
'adminfile' => nil, 'adminfile' => nil,
}) })
} }
end
it { it {
should contain_file('ssh_config').with({ should contain_file('ssh_config').with({
@ -143,7 +144,7 @@ describe 'ssh' do
'owner' => 'root', 'owner' => 'root',
'group' => 'root', 'group' => 'root',
'mode' => '0644', 'mode' => '0644',
'require' => 'Package[ssh_packages]', 'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
}) })
} }
@ -163,7 +164,7 @@ describe 'ssh' do
'owner' => 'root', 'owner' => 'root',
'group' => 'root', 'group' => 'root',
'mode' => '0644', 'mode' => '0644',
'require' => 'Package[ssh_packages]', 'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
}) })
} }
@ -214,15 +215,15 @@ describe 'ssh' do
it { should_not include_class('common')} it { should_not include_class('common')}
['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'].each do |pkg|
it { it {
should contain_package('ssh_packages').with({ should contain_package(pkg).with({
'ensure' => 'installed', 'ensure' => 'installed',
'name' => ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'], 'source' => '/var/spool/pkg',
'source' => '/var/spool/pkg', 'adminfile' => nil,
'adminfile' => nil, })
}) }
} end
it { it {
should contain_file('ssh_config').with({ should contain_file('ssh_config').with({
@ -231,7 +232,7 @@ describe 'ssh' do
'owner' => 'root', 'owner' => 'root',
'group' => 'root', 'group' => 'root',
'mode' => '0644', 'mode' => '0644',
'require' => 'Package[ssh_packages]', 'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
}) })
} }
@ -251,7 +252,7 @@ describe 'ssh' do
'owner' => 'root', 'owner' => 'root',
'group' => 'root', 'group' => 'root',
'mode' => '0644', 'mode' => '0644',
'require' => 'Package[ssh_packages]', 'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
}) })
} }
@ -299,16 +300,18 @@ describe 'ssh' do
end end
it { should include_class('ssh')} it { should include_class('ssh')}
it { should_not include_class('common')} it { should_not include_class('common')}
it { ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'].each do |pkg|
should contain_package('ssh_packages').with({ it {
'ensure' => 'installed', should contain_package(pkg).with({
'name' => ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'], 'ensure' => 'installed',
'source' => '/var/spool/pkg', 'source' => '/var/spool/pkg',
'adminfile' => nil, 'adminfile' => nil,
}) })
} }
end
it { it {
should contain_file('ssh_config').with({ should contain_file('ssh_config').with({
@ -317,7 +320,7 @@ describe 'ssh' do
'owner' => 'root', 'owner' => 'root',
'group' => 'root', 'group' => 'root',
'mode' => '0644', 'mode' => '0644',
'require' => 'Package[ssh_packages]', 'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
}) })
} }
@ -337,7 +340,7 @@ describe 'ssh' do
'owner' => 'root', 'owner' => 'root',
'group' => 'root', 'group' => 'root',
'mode' => '0644', 'mode' => '0644',
'require' => 'Package[ssh_packages]', 'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
}) })
} }