Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
yakatz committed Jan 16, 2022
1 parent d0987d0 commit 2b32e31
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,52 +27,55 @@

case facts[:osfamily]
when 'RedHat'
it { is_expected.to contain_file('/var/lib/smokeping/images').with(
ensure: 'directory',
owner: 'apache',
group: 'apache',
recurse: true,
) }
it {
is_expected.to contain_file('/var/lib/smokeping/images').with(
ensure: 'directory',
owner: 'apache',
group: 'apache',
recurse: true
)
}
when 'Debian'
it { is_expected.to contain_file('/var/cache/smokeping/images').with(
ensure: 'directory',
owner: 'www-data',
group: 'www-data',
recurse: true,
) }
it {
is_expected.to contain_file('/var/cache/smokeping/images').with(
ensure: 'directory',
owner: 'www-data',
group: 'www-data',
recurse: true
)
}
end
end

context "change img_cachedir" do

context 'change img_cachedir' do
let :params do
{
cgiurl: 'http://some.url/smokeping.cgi',
master_url: 'http://somewhere/cgi-bin/smokeping.cgi',
path_imgcache: '/smokeping/images',
path_imgcache: '/smokeping/images'
}
end

it { is_expected.to contain_file('/smokeping/images').with(
ensure: 'directory',
recurse: true,
) }
it {
is_expected.to contain_file('/smokeping/images').with(
ensure: 'directory',
recurse: true
)
}

context "don't manage img_cachedir" do

let :params do
{
cgiurl: 'http://some.url/smokeping.cgi',
master_url: 'http://somewhere/cgi-bin/smokeping.cgi',
path_imgcache: '/smokeping/images',
manage_imgcache: false,
manage_imgcache: false
}
end

it { is_expected.not_to contain_file('/smokeping/images') }
end
end

end
end
end

0 comments on commit 2b32e31

Please sign in to comment.