-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
110 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,12 @@ | |
}, | ||
{ | ||
"operatingsystem": "FreeBSD" | ||
}, | ||
{ | ||
"operatingsystem": "OpenBSD", | ||
"operatingsystemrelease": [ | ||
"7" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,55 +9,57 @@ | |
facts | ||
end | ||
|
||
context 'with minimal params' do | ||
let(:title) { '3489' } | ||
if facts[:kernel] == 'Linux' | ||
context 'with minimal params' do | ||
let(:title) { '3489' } | ||
|
||
it { is_expected.to compile.with_all_deps } | ||
it { is_expected.to contain_class('memcached::instance::servicefile') } | ||
it { is_expected.to contain_service('[email protected]') } | ||
it { is_expected.to contain_systemd__unit_file('[email protected]') } | ||
it { is_expected.to compile.with_all_deps } | ||
it { is_expected.to contain_class('memcached::instance::servicefile') } | ||
it { is_expected.to contain_service('[email protected]') } | ||
it { is_expected.to contain_systemd__unit_file('[email protected]') } | ||
|
||
context 'on selinux', if: facts[:os]['selinux']['enabled'] == true do | ||
it { is_expected.to contain_selinux__port('[email protected]') } | ||
end | ||
context 'on selinux', if: facts[:os]['selinux']['enabled'] == true do | ||
it { is_expected.to contain_selinux__port('[email protected]') } | ||
end | ||
|
||
context 'without selinux', if: facts[:os]['family'] != 'RedHat' do | ||
it { is_expected.not_to contain_selinux__port('[email protected]') } | ||
context 'without selinux', if: facts[:os]['family'] != 'RedHat' do | ||
it { is_expected.not_to contain_selinux__port('[email protected]') } | ||
end | ||
end | ||
end | ||
|
||
context 'with limits' do | ||
let(:title) { '3489' } | ||
context 'with limits' do | ||
let(:title) { '3489' } | ||
|
||
let :params do | ||
{ | ||
limits: { | ||
LimitNOFILE: 8192 | ||
let :params do | ||
{ | ||
limits: { | ||
LimitNOFILE: 8192 | ||
} | ||
} | ||
} | ||
end | ||
|
||
it { is_expected.to compile.with_all_deps } | ||
it { is_expected.to contain_class('memcached::instance::servicefile') } | ||
it { is_expected.to contain_service('[email protected]') } | ||
it { is_expected.to contain_systemd__unit_file('[email protected]') } | ||
it { is_expected.to contain_systemd__Service_limits('[email protected]') } | ||
end | ||
|
||
it { is_expected.to compile.with_all_deps } | ||
it { is_expected.to contain_class('memcached::instance::servicefile') } | ||
it { is_expected.to contain_service('[email protected]') } | ||
it { is_expected.to contain_systemd__unit_file('[email protected]') } | ||
it { is_expected.to contain_systemd__Service_limits('[email protected]') } | ||
end | ||
context 'with overrides' do | ||
let(:title) { '3489' } | ||
|
||
context 'with overrides' do | ||
let(:title) { '3489' } | ||
let :params do | ||
{ | ||
override_content: "[Service]\nEnvironment='LISTEN=-l 0.0.0.0'" | ||
} | ||
end | ||
|
||
let :params do | ||
{ | ||
override_content: "[Service]\nEnvironment='LISTEN=-l 0.0.0.0'" | ||
} | ||
it { is_expected.to compile.with_all_deps } | ||
it { is_expected.to contain_class('memcached::instance::servicefile') } | ||
it { is_expected.to contain_service('[email protected]') } | ||
it { is_expected.to contain_systemd__unit_file('[email protected]') } | ||
it { is_expected.to contain_systemd__dropin_file('[email protected]') } | ||
end | ||
|
||
it { is_expected.to compile.with_all_deps } | ||
it { is_expected.to contain_class('memcached::instance::servicefile') } | ||
it { is_expected.to contain_service('[email protected]') } | ||
it { is_expected.to contain_systemd__unit_file('[email protected]') } | ||
it { is_expected.to contain_systemd__dropin_file('[email protected]') } | ||
end | ||
end | ||
end | ||
|