GitLab upgraded to 13.8.0-ee.0 - changelog: https://gitlab.com/gitlab-org/gitlab/blob/master/CHANGELOG-EE.md

Commit e650e2a1 authored by Simonas's avatar Simonas Committed by Tim Smith

Red Hat & CentOS dynamic matchers (#169)

* Add redhat and centos to dynamic matcher list

* Add sample tests for dynamic "centos_final?" matcher

* Update README with centos example
parent 920e002e
......@@ -358,6 +358,7 @@ There are also a series of dynamically defined matchers that map named operating
- `debian_after_squeeze?`
- `linuxmint_after_or_at_olivia?`
- `mac_os_x_lion?`
- `centos_final?`
- `ubuntu_before_lucid?`
- `ubuntu_before_or_at_maverick?`
- `solaris_10?`
......
......@@ -49,6 +49,20 @@ class Chef
'high_sierra' => '10.13',
'mojave' => '10.14',
},
'redhat' => {
'santiago' => '6',
'6' => '6',
'maipo' => '7',
'7' => '7',
'oompa' => '8',
'8' => '8'
},
'centos' => {
'final' => '6',
'6' => '6',
'core' => '7',
'7' => '7'
},
'solaris' => {
'7' => '5.7',
'8' => '5.8',
......
......@@ -289,6 +289,18 @@ describe Chef::Sugar::Platform do
end
end
describe '#centos_final?' do
it 'returns true when the version is a subset of the major' do
node = { 'platform' => 'centos', 'platform_version' => '6.8' }
expect(described_class.centos_final?(node)).to be true
end
it 'returns false when the version is not the major' do
node = { 'platform' => 'centos', 'platform_version' => '7.4' }
expect(described_class.centos_final?(node)).to be false
end
end
describe '#debian_wheezy?' do
it 'returns true when the version is a subset of the major' do
node = { 'platform' => 'debian', 'platform_version' => '7.1' }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment