diff --git a/metadata.json b/metadata.json index 4987666..d6daf4d 100644 --- a/metadata.json +++ b/metadata.json @@ -31,6 +31,13 @@ "6", "7" ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "12.04", + "14.04" + ] } ], "requirements": [ diff --git a/spec/classes/riak_spec.rb b/spec/classes/riak_spec.rb index f0ee732..d0b9288 100644 --- a/spec/classes/riak_spec.rb +++ b/spec/classes/riak_spec.rb @@ -30,7 +30,12 @@ it { is_expected.to contain_class('riak::repository::el') } it { is_expected.to contain_yumrepo('basho_riak') } when 'Debian' - it { is_expected.to contain_class('riak::repository::debian') } + case facts[:operatingsystem] + when 'ubuntu' + it { is_expected.to contain_class('riak::repository::ubuntu') } + else + it { is_expected.to contain_class('riak::repository::debian') } + end it { is_expected.to contain_apt__source('riak') } end end @@ -50,7 +55,12 @@ it { is_expected.to_not contain_class('riak::repository::el') } it { is_expected.to_not contain_yumrepo('basho_riak') } when 'Debian' - it { is_expected.to_not contain_class('riak::repository::debian') } + case facts[:operationsystem] + when 'ubuntu' + it { is_expected.to_not contain_class('riak::repository::ubuntu') } + else + it { is_expected.to_not contain_class('riak::repository::debian') } + end it { is_expected.to_not contain_apt__source('riak') } end end