From dc66fb8463498f9717a5e31c37eafcf2b9483c03 Mon Sep 17 00:00:00 2001 From: Simon Aquino Date: Mon, 7 Dec 2015 19:08:31 +0000 Subject: [PATCH] Puppet-rspec test for auth param This commit contains a puppet-rspec test for the newly introduced auth parameter. --- spec/classes/uchiwa_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/classes/uchiwa_spec.rb b/spec/classes/uchiwa_spec.rb index 787b7c8..d9e4ff7 100644 --- a/spec/classes/uchiwa_spec.rb +++ b/spec/classes/uchiwa_spec.rb @@ -160,4 +160,12 @@ } end + context 'with static JWT RSA keys' do + let(:params) {{ :auth => { 'publickey' => '/etc/sensu/uchiwa.rsa.pub', 'privatekey' => '/etc/sensu/uchiwa.rsa' } }} + it { + should contain_file('/etc/sensu/uchiwa.json') \ + .with_content(/"auth": {\n "publickey": "\/etc\/sensu\/uchiwa.rsa.pub",\n "privatekey": "\/etc\/sensu\/uchiwa.rsa"\n }/) + } + end + end