basho-labs / puppet-riak

A puppet module to deploy Riak clusters
Apache License 2.0
33 stars 37 forks source link

Use $package variable in package resource when using httpfile #27

Closed andyshinn closed 10 years ago

andyshinn commented 10 years ago

In my previous fix for the package resource name I missed the package when using httpfile. I am actually using Riak EE and using our custom provided package and it was failing. This should fix that scenario.

Note: There were already two unit tests failing and I am not sure how to fix them yet:

Failures:

  1) riak::vmargs at baseline defaults
     Failure/Error: }) }
     Puppet::Error:
       Duplicate declaration: Class[Riak::Vmargs] is already declared; cannot redeclare at /Users/ashinn/Projects/puppet-riak/spec/fixtures/modules/riak/manifests/init.pp:225 on node andys-macbook.local
     # ./spec/classes/vmargs_spec.rb:18:in `block (3 levels) in <top (required)>'

  2) riak::vmargs when decommissioning w/ params (absent):
     Failure/Error: it { should contain_file('/etc/riak/vm.args').with_ensure('absent') }
     Puppet::Error:
       Duplicate declaration: Class[Riak::Vmargs] is already declared; cannot redeclare at /Users/ashinn/Projects/puppet-riak/spec/fixtures/modules/riak/manifests/init.pp:225 on node andys-macbook.local
     # ./spec/classes/vmargs_spec.rb:35:in `block (3 levels) in <top (required)>'

But I did update the test for the riak class custom package name.

haf commented 10 years ago

The reason for the test failures is that the puppet test runner has isolation bugs that doesn't allow testing functions and catalogues at the same time, which I did. But I'll look into newer versions of rspec for puppet when I release the riak-2.0 version of this module.