Skip to content

Commit

Permalink
Ensure spec tests for Solaris port pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoneycutt committed Feb 25, 2014
1 parent ec878ab commit 94d8fef
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@
it { should_not include_class('common')}


it {
should contain_package('ssh_packages').with({
'ensure' => 'installed',
'name' => ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'],
'source' => '/var/spool/pkg',
'adminfile' => nil,
})
}
['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'].each do |pkg|
it {
should contain_package(pkg).with({
'ensure' => 'installed',
'source' => '/var/spool/pkg',
'adminfile' => nil,
})
}
end

it {
should contain_file('ssh_config').with({
Expand All @@ -143,7 +144,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => 'Package[ssh_packages]',
'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
})
}

Expand All @@ -163,7 +164,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => 'Package[ssh_packages]',
'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
})
}

Expand Down Expand Up @@ -214,15 +215,15 @@

it { should_not include_class('common')}


it {
should contain_package('ssh_packages').with({
'ensure' => 'installed',
'name' => ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'],
'source' => '/var/spool/pkg',
'adminfile' => nil,
})
}
['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'].each do |pkg|
it {
should contain_package(pkg).with({
'ensure' => 'installed',
'source' => '/var/spool/pkg',
'adminfile' => nil,
})
}
end

it {
should contain_file('ssh_config').with({
Expand All @@ -231,7 +232,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => 'Package[ssh_packages]',
'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
})
}

Expand All @@ -251,7 +252,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => 'Package[ssh_packages]',
'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
})
}

Expand Down Expand Up @@ -299,16 +300,18 @@
end

it { should include_class('ssh')}

it { should_not include_class('common')}

it {
should contain_package('ssh_packages').with({
'ensure' => 'installed',
'name' => ['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'],
'source' => '/var/spool/pkg',
'adminfile' => nil,
})
}
['SUNWsshcu','SUNWsshdr','SUNWsshdu','SUNWsshr','SUNWsshu'].each do |pkg|
it {
should contain_package(pkg).with({
'ensure' => 'installed',
'source' => '/var/spool/pkg',
'adminfile' => nil,
})
}
end

it {
should contain_file('ssh_config').with({
Expand All @@ -317,7 +320,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => 'Package[ssh_packages]',
'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
})
}

Expand All @@ -337,7 +340,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => 'Package[ssh_packages]',
'require' => [ 'Package[SUNWsshcu]', 'Package[SUNWsshdr]', 'Package[SUNWsshdu]', 'Package[SUNWsshr]', 'Package[SUNWsshu]' ],
})
}

Expand Down

0 comments on commit 94d8fef

Please sign in to comment.