diff --git a/.nodeset.yml b/.nodeset.yml index b802983..cb5c198 100644 --- a/.nodeset.yml +++ b/.nodeset.yml @@ -9,3 +9,7 @@ sets: nodes: 'main.vm': prefab: 'debian-607-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/spec/system/gmetad_spec.rb b/spec/system/gmetad_spec.rb index dc5e2b2..c717e04 100644 --- a/spec/system/gmetad_spec.rb +++ b/spec/system/gmetad_spec.rb @@ -2,16 +2,21 @@ describe 'ganglia::gmetad class' do case node.facts['osfamily'] - when 'RedHat', 'Debian' + when 'RedHat' package_name = 'ganglia-gmetad' service_name = 'gmetad' + when 'Debian' + package_name = 'gmetad' + service_name = 'gmetad' end describe 'running puppet code' do # Using puppet_apply as a helper it 'should work with no errors' do pp = <<-EOS - class { 'epel': } -> + if $::osfamily == 'RedHat' { + class { 'epel': } -> Class['ganglia::gmetad'] + } class { 'ganglia::gmetad': } EOS diff --git a/spec/system/gmond_spec.rb b/spec/system/gmond_spec.rb index 3432752..38fedee 100644 --- a/spec/system/gmond_spec.rb +++ b/spec/system/gmond_spec.rb @@ -2,16 +2,25 @@ describe 'ganglia::gmond class' do case node.facts['osfamily'] - when 'RedHat', 'Debian' + when 'RedHat' package_name = 'ganglia-gmond' service_name = 'gmond' + daemon_name = 'gmond' + when 'Debian' + # Amazingly, the init script is named ganglia-monitor while the daemon runs + # with the executable name of gmond. + package_name = 'ganglia-monitor' + service_name = 'ganglia-monitor' + daemon_name = 'gmond' end describe 'running puppet code' do # Using puppet_apply as a helper it 'should work with no errors' do pp = <<-EOS - class { 'epel': } -> + if $::osfamily == 'RedHat' { + class { 'epel': } -> Class['ganglia::gmond'] + } class { 'ganglia::gmond': } EOS @@ -29,7 +38,10 @@ class { 'ganglia::gmond': } end describe service(service_name) do - it { should be_running } it { should be_enabled } end + + describe service(daemon_name) do + it { should be_running } + end end diff --git a/spec/system/web_spec.rb b/spec/system/web_spec.rb index 0a2ba11..c1c77d6 100644 --- a/spec/system/web_spec.rb +++ b/spec/system/web_spec.rb @@ -2,15 +2,19 @@ describe 'ganglia::web class' do case node.facts['osfamily'] - when 'RedHat', 'Debian' + when 'RedHat' package_name = 'ganglia-web' + when 'Debian' + package_name = 'ganglia-webfrontend' end describe 'running puppet code' do # Using puppet_apply as a helper it 'should work with no errors' do pp = <<-EOS - class { 'epel': } -> + if $::osfamily == 'RedHat' { + class { 'epel': } -> Class['ganglia::web'] + } class { 'ganglia::web': } EOS