From fbb8f40594a4b6d4085128161d4973e28e3c91f8 Mon Sep 17 00:00:00 2001 From: Graham Bleach Date: Tue, 22 Oct 2013 12:36:19 +0100 Subject: [PATCH] Fix group ownership on files. And add a test to stop it being broken again. --- manifests/init.pp | 2 +- spec/defines/init_spec.rb | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 214c929..25c2ff5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -72,7 +72,7 @@ define concat( $safe_group = $group ? { undef => $concat::setup::root_group, - default => $safe_group, + default => $group, } case $warn { diff --git a/spec/defines/init_spec.rb b/spec/defines/init_spec.rb index 4195d55..d19ea2d 100644 --- a/spec/defines/init_spec.rb +++ b/spec/defines/init_spec.rb @@ -106,4 +106,26 @@ describe 'concat' do end +describe 'concat' do + let(:title) { '/etc/foo.bar' } + let(:params) { { + :group => 'something', + :owner => 'someone', + :mode => '0755' + } } + let(:facts) { { + :concat_basedir => '/var/lib/puppet/concat', + :id => 'root', + } } + + it do + should contain_file("/etc/foo.bar").with( { + 'ensure' => 'present', + 'owner' => 'someone', + 'group' => 'something', + 'mode' => '0755', + } ) + end +end + # vim:sw=2:ts=2:expandtab:textwidth=79