Skip to content

Commit

Permalink
Adding specs for the existing manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
createdbypete committed Aug 22, 2013
1 parent 3998b9c commit 3319ce9
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/classes/java_idrac7_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require 'spec_helper'

describe "java::idrac7" do
let(:facts) { default_test_facts }

it do
should include_class('java')

['.java', '.java/deployment', '.java/deployment/security'].each do |dir|
should contain_file("/Users/testuser/#{dir}").with({
:ensure => 'directory',
:mode => '0750'
})
end

should contain_file("/Users/testuser/.java/deployment/security/trusted.certs").with({
:ensure => 'file',
:mode => '0640',
:source => 'puppet:///modules/java/trusted.certs'
})

should contain_file("/Users/testuser/.java/deployment/security/trusted.jssecerts").with({
:ensure => 'file',
:mode => '0640',
:source => 'puppet:///modules/java/trusted.jssecerts'
})
end
end
29 changes: 29 additions & 0 deletions spec/classes/java_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require 'spec_helper'

describe "java" do
let(:facts) { default_test_facts }

it do
should include_class('boxen::config')

should contain_package('jre-7u21.dmg').with({
:ensure => 'present',
:alias => 'java-jre',
:provider => 'pkgdmg',
:source => 'https://s3.amazonaws.com/boxen-downloads/java/jre-7u21-macosx-x64.dmg'
})

should contain_package('jdk-7u21.dmg').with({
:ensure => 'present',
:alias => 'java',
:provider => 'pkgdmg',
:source => 'https://s3.amazonaws.com/boxen-downloads/java/jdk-7u21-macosx-x64.dmg'
})

should contain_file('/test/boxen/bin/java').with({
:source => 'puppet:///modules/java/java.sh',
:mode => '0755',
:require => 'Package[java]'
})
end
end

0 comments on commit 3319ce9

Please sign in to comment.