From 96e55502e9b895a075d6ab51141fa1344067120e Mon Sep 17 00:00:00 2001 From: Sam Bashton Date: Fri, 30 Jan 2015 11:01:07 +0000 Subject: [PATCH] Fix arch tests --- manifests/params.pp | 6 ++++++ spec/classes/example_spec.rb | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 19d41dc..751b2eb 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,6 +10,12 @@ class consul_template::params { $package_ensure = 'latest' $version = '0.6.0' + case $::architecture { + 'x86_64', 'amd64': { $arch = 'amd64' } + 'i386': { $arch = '386' } + default: { fail("Unsupported kernel architecture: ${::architecture}") } + } + $os = downcase($::kernel) $init_style = $::operatingsystem ? { diff --git a/spec/classes/example_spec.rb b/spec/classes/example_spec.rb index db653b3..85fd692 100644 --- a/spec/classes/example_spec.rb +++ b/spec/classes/example_spec.rb @@ -8,7 +8,8 @@ describe 'consul_template' do let(:facts) {{ :osfamily => osfamily, :concat_basedir => '/foo', - :path => '/bin:/sbin:/usr/bin:/usr/sbin' + :path => '/bin:/sbin:/usr/bin:/usr/sbin', + :architecture => 'x86_64' }} it { is_expected.to compile.with_all_deps }