Skip to content

Commit

Permalink
refactor default spec test
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Jan 30, 2024
1 parent ab51698 commit 166263b
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions spec/defines/generate_concat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,27 @@
require 'spec_helper'

describe 'Rsyslog::Generate_concat', include_rsyslog: true do
let(:pre_condition) { 'include rsyslog' }
let(:title) { 'mygeneratedconcat' }
context 'default' do
let(:pre_condition) { 'include rsyslog' }
let(:title) { 'mygeneratedconcat' }

let(:params) do
{
confdir: '/etc/rsyslog.d',
target: '50-rsyslog.conf'
}
end
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let :facts do
os_facts
end

let(:params) do
{
confdir: '/etc/rsyslog.d',
target: '50-rsyslog.conf'
}
end

context 'with defaults' do
it { is_expected.to contain_concat('/etc/rsyslog.d/50-rsyslog.conf').that_notifies('Service[rsyslog]') }
it 'contains rsyslog config with syslog service notification' do
is_expected.to contain_concat('/etc/rsyslog.d/50-rsyslog.conf').that_notifies('Service[rsyslog]')
end
end
end
end
end

0 comments on commit 166263b

Please sign in to comment.