Skip to content
Browse files

fixing riak spec:

 * All tests for Riak class passing.
 * Still funny 'cannot redeclare resource on node' errors on
   vmargs_specs.rb...
  • Loading branch information...
1 parent 976dd43 commit dbe24dbf427d19b46088ad31dd603950857fdc6d @haf haf committed
Showing with 6 additions and 8 deletions.
  1. +6 −8 spec/classes/riak_spec.rb
View
14 spec/classes/riak_spec.rb
@@ -13,23 +13,21 @@
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',
@@ -37,7 +35,7 @@
end
it { should contain_package('riak').
with({
- :ensure => 'latest',
+ :ensure => 'installed',
:source =>'/tmp/custom_riak-1.2.0.deb'}) }
end

0 comments on commit dbe24db

Please sign in to comment.
Something went wrong with that request. Please try again.