From 39f6e0e1381ff4a69e21c6ea590af66682a820c1 Mon Sep 17 00:00:00 2001 From: Bill Weiss Date: Mon, 19 May 2014 10:40:30 -0500 Subject: [PATCH 1/5] Upstream says don't directly call concat::setup --- manifests/config.pp | 2 -- spec/classes/openvpn_config_spec.rb | 1 - 2 files changed, 3 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 32b32094..3094699b 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -32,8 +32,6 @@ class openvpn::config { if $::osfamily == 'Debian' { - include concat::setup - concat { '/etc/default/openvpn': owner => root, diff --git a/spec/classes/openvpn_config_spec.rb b/spec/classes/openvpn_config_spec.rb index bbb63a77..f4cc7c72 100644 --- a/spec/classes/openvpn_config_spec.rb +++ b/spec/classes/openvpn_config_spec.rb @@ -7,7 +7,6 @@ context "on Debian based machines" do let (:facts) { { :osfamily => 'Debian', :concat_basedir => '/var/lib/puppet/concat' } } - it { should contain_class('concat::setup') } it { should contain_concat('/etc/default/openvpn') } it { should contain_concat__fragment('openvpn.default.header') } end From 31dde1baf320b4897b917ea66e96ecab0537f968 Mon Sep 17 00:00:00 2001 From: Bill Weiss Date: Mon, 19 May 2014 12:23:49 -0500 Subject: [PATCH 2/5] Add spec to make sure we don't concat::setup --- spec/classes/openvpn_config_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/classes/openvpn_config_spec.rb b/spec/classes/openvpn_config_spec.rb index f4cc7c72..bd320e1f 100644 --- a/spec/classes/openvpn_config_spec.rb +++ b/spec/classes/openvpn_config_spec.rb @@ -3,10 +3,11 @@ describe 'openvpn::config', :type => :class do it { should create_class('openvpn::config') } - + context "on Debian based machines" do let (:facts) { { :osfamily => 'Debian', :concat_basedir => '/var/lib/puppet/concat' } } + if { should not contain_class('concat::setup') } it { should contain_concat('/etc/default/openvpn') } it { should contain_concat__fragment('openvpn.default.header') } end From 31b7bc93bbc6a7df07d1c9ca257762dc6eb2aa8f Mon Sep 17 00:00:00 2001 From: Bill Weiss Date: Mon, 19 May 2014 13:17:11 -0500 Subject: [PATCH 3/5] Typoed 'it' as 'if' :( --- spec/classes/openvpn_config_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/classes/openvpn_config_spec.rb b/spec/classes/openvpn_config_spec.rb index bd320e1f..dada225b 100644 --- a/spec/classes/openvpn_config_spec.rb +++ b/spec/classes/openvpn_config_spec.rb @@ -7,7 +7,7 @@ context "on Debian based machines" do let (:facts) { { :osfamily => 'Debian', :concat_basedir => '/var/lib/puppet/concat' } } - if { should not contain_class('concat::setup') } + it { should not contain_class('concat::setup') } it { should contain_concat('/etc/default/openvpn') } it { should contain_concat__fragment('openvpn.default.header') } end From fd7a0df895bd0844a32937287154739108e21230 Mon Sep 17 00:00:00 2001 From: Bill Weiss Date: Mon, 19 May 2014 13:23:02 -0500 Subject: [PATCH 4/5] should not -> should_not --- spec/classes/openvpn_config_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/classes/openvpn_config_spec.rb b/spec/classes/openvpn_config_spec.rb index dada225b..ae3dc9af 100644 --- a/spec/classes/openvpn_config_spec.rb +++ b/spec/classes/openvpn_config_spec.rb @@ -7,7 +7,7 @@ context "on Debian based machines" do let (:facts) { { :osfamily => 'Debian', :concat_basedir => '/var/lib/puppet/concat' } } - it { should not contain_class('concat::setup') } + it { should_not contain_class('concat::setup') } it { should contain_concat('/etc/default/openvpn') } it { should contain_concat__fragment('openvpn.default.header') } end From d48a41d371362632df228423304a91bda3d2ddd3 Mon Sep 17 00:00:00 2001 From: Bill Weiss Date: Mon, 19 May 2014 13:29:06 -0500 Subject: [PATCH 5/5] We're already testing that concat works, no need to check the internals --- spec/classes/openvpn_config_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/classes/openvpn_config_spec.rb b/spec/classes/openvpn_config_spec.rb index ae3dc9af..09d027cd 100644 --- a/spec/classes/openvpn_config_spec.rb +++ b/spec/classes/openvpn_config_spec.rb @@ -7,7 +7,6 @@ context "on Debian based machines" do let (:facts) { { :osfamily => 'Debian', :concat_basedir => '/var/lib/puppet/concat' } } - it { should_not contain_class('concat::setup') } it { should contain_concat('/etc/default/openvpn') } it { should contain_concat__fragment('openvpn.default.header') } end