Skip to content

Commit

Permalink
fixing riak spec:
Browse files Browse the repository at this point in the history
 * All tests for Riak class passing.
 * Still funny 'cannot redeclare resource on node' errors on
   vmargs_specs.rb...
  • Loading branch information
haf committed Jan 28, 2013
1 parent 976dd43 commit dbe24db
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions spec/classes/riak_spec.rb
Expand Up @@ -13,31 +13,29 @@
describe 'at baseline with defaults' do
let(:params) {{}}
it { should contain_class('riak') }
it { should contain_httpfile('/tmp/riak-1.2.0.deb').with_ensure('present') }
# we're defaulting to repos now, not http files
it { should contain_package('riak').with_ensure('installed') }
it { should contain_service('riak').with({
:ensure => 'running',
:enable => 'true'
}) }
it { should contain_file('/etc/riak/app.config').with({ :owner => 'root',
:group => 'root', :mode => '0644', :ensure => 'present' }) }
it { should contain_file('/etc/riak/vm.args').with({ :owner => 'root',
:group => 'root', :mode => '0644', :ensure => 'present' }) }
it { should contain_file('/etc/riak/app.config').with_ensure('present') }
it { should contain_file('/etc/riak/vm.args').with_ensure('present') }
it { should contain_riak__vmargs().with_notify('Service[riak]') }
end

describe 'custom package configuration' do
let(:params) { { :version => '1.2.0', :package => 'custom_riak',
:package_hash => 'abcd' } }
it 'should be downloading latest' do
:download_hash => 'abcd', :use_repos => false } }
it 'should be downloading the package to be installed' do
subject.should contain_httpfile('/tmp/custom_riak-1.2.0.deb').
with({
:path => '/tmp/custom_riak-1.2.0.deb',
:hash => 'abcd' })
end
it { should contain_package('riak').
with({
:ensure => 'latest',
:ensure => 'installed',
:source =>'/tmp/custom_riak-1.2.0.deb'}) }
end

Expand Down

0 comments on commit dbe24db

Please sign in to comment.