From e25f5ddaafb78a5cba5f2813867a2e10907314cf Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Mon, 1 Oct 2018 10:02:32 +0100 Subject: [PATCH] Fix beaker tests Since https://github.com/puppetlabs/beaker-puppet/pull/59, `fact` no longer works with symbols. One test was failing. Two others were being skipped entirely. --- spec/acceptance/class_spec.rb | 4 ++-- spec/acceptance/curl_json_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index abc0cee2f..e4482ddba 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -37,14 +37,14 @@ class { '::collectd::plugin::rabbitmq': } apply_manifest(pp, catch_changes: true) end - if fact(:osfamily) == 'Debian' + if fact('osfamily') == 'Debian' describe file('/etc/collectd/conf.d/10-rabbitmq.conf') do it { is_expected.to be_file } it { is_expected.to contain 'TypesDB "/usr/local/share/collectd-rabbitmq/types.db.custom"' } end end - if fact(:osfamily) == 'RedHat' + if fact('osfamily') == 'RedHat' describe file('/etc/collectd.d/10-rabbitmq.conf') do it { is_expected.to be_file } it { is_expected.to contain 'TypesDB "/usr/share/collectd-rabbitmq/types.db.custom"' } diff --git a/spec/acceptance/curl_json_spec.rb b/spec/acceptance/curl_json_spec.rb index e06de9774..247f1f3af 100644 --- a/spec/acceptance/curl_json_spec.rb +++ b/spec/acceptance/curl_json_spec.rb @@ -24,9 +24,9 @@ apply_manifest(pp, catch_changes: true) end - case fact(:osfamily) + case fact('osfamily') when 'Debian' - curl_json_package = if fact(:lsbdistcodename) == 'precise' + curl_json_package = if fact('lsbdistcodename') == 'precise' 'libyajl1' else 'libyajl2'