diff options
| author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-11-14 13:35:09 -0800 |
|---|---|---|
| committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-11-14 13:35:09 -0800 |
| commit | 0abe9ee9a5ea1ba74ae78e6eac404be9d37252a9 (patch) | |
| tree | ffd833a7397cd3dee52e8c68581a03cb8c0f40e1 /chef-utils/spec | |
| parent | 37d505f3240e4b0a0ba0c316e6ecff4e9c3e5e45 (diff) | |
| download | chef-0abe9ee9a5ea1ba74ae78e6eac404be9d37252a9.tar.gz | |
additional chef-utils helpers for rhel6/7/8
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'chef-utils/spec')
| -rw-r--r-- | chef-utils/spec/unit/dsl/platform_family_spec.rb | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/chef-utils/spec/unit/dsl/platform_family_spec.rb b/chef-utils/spec/unit/dsl/platform_family_spec.rb index 6349ef295f..8ceb1bdb4a 100644 --- a/chef-utils/spec/unit/dsl/platform_family_spec.rb +++ b/chef-utils/spec/unit/dsl/platform_family_spec.rb @@ -88,16 +88,28 @@ RSpec.describe ChefUtils::DSL::PlatformFamily do pf_reports_true_for(:arch?, :arch_linux?) end - context "on centos" do - let(:options) { { platform: "centos" } } + context "on centos6" do + let(:options) { { platform: "centos", version: "6.9" } } - pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?) + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel6?) end - context "on clearos" do - let(:options) { { platform: "clearos" } } + context "on centos7" do + let(:options) { { platform: "centos", version: "7.7.1908" } } - pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?) + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel7?) + end + + context "on centos8" do + let(:options) { { platform: "centos", version: "8" } } + + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel8?) + end + + context "on clearos7" do + let(:options) { { platform: "clearos", version: "7.4" } } + + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel7?) end context "on dragonfly4" do @@ -142,16 +154,34 @@ RSpec.describe ChefUtils::DSL::PlatformFamily do pf_reports_true_for(:suse?, :rpm_based?) end - context "on oracle" do - let(:options) { { platform: "oracle" } } + context "on oracle6" do + let(:options) { { platform: "oracle", version: "6.10" } } + + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel6?) + end + + context "on oracle7" do + let(:options) { { platform: "oracle", version: "7.6" } } + + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel7?) + end + + context "on redhat6" do + let(:options) { { platform: "redhat", version: "6.9" } } + + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel6?) + end + + context "on redhat7" do + let(:options) { { platform: "redhat", version: "7.6" } } - pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?) + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel7?) end - context "on redhat" do - let(:options) { { platform: "redhat" } } + context "on redhat8" do + let(:options) { { platform: "redhat", version: "8" } } - pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?) + pf_reports_true_for(:rhel?, :rpm_based?, :fedora_derived?, :redhat_based?, :el?, :rhel8?) end context "on smartos" do |
