parent
f04e1ae2d4
commit
2745c62d0c
@ -1,52 +0,0 @@
|
||||
From 8cf4f5cb49ac3742c0c650f81875872ac3e09fbb Mon Sep 17 00:00:00 2001
|
||||
From: Alex Schultz <aschultz@redhat.com>
|
||||
Date: Wed, 3 Oct 2018 12:55:30 -0600
|
||||
Subject: [PATCH 5/5] (PUP-9198) Add RHEL8 support in the dnf provider
|
||||
|
||||
dnf should be the default for RHEL8
|
||||
---
|
||||
lib/puppet/provider/package/dnf.rb | 1 +
|
||||
spec/unit/provider/package/dnf_spec.rb | 15 +++++++++++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/lib/puppet/provider/package/dnf.rb b/lib/puppet/provider/package/dnf.rb
|
||||
index c0ed877..ee27322 100644
|
||||
--- a/lib/puppet/provider/package/dnf.rb
|
||||
+++ b/lib/puppet/provider/package/dnf.rb
|
||||
@@ -29,6 +29,7 @@ Puppet::Type.type(:package).provide :dnf, :parent => :yum do
|
||||
end
|
||||
|
||||
defaultfor :operatingsystem => :fedora
|
||||
+ defaultfor :osfamily => :redhat, :operatingsystemmajrelease => ["8"]
|
||||
|
||||
def self.update_command
|
||||
# In DNF, update is deprecated for upgrade
|
||||
diff --git a/spec/unit/provider/package/dnf_spec.rb b/spec/unit/provider/package/dnf_spec.rb
|
||||
index 5e57337..40345dc 100644
|
||||
--- a/spec/unit/provider/package/dnf_spec.rb
|
||||
+++ b/spec/unit/provider/package/dnf_spec.rb
|
||||
@@ -23,6 +23,21 @@ context 'default' do
|
||||
expect(provider_class).to be_default
|
||||
end
|
||||
end
|
||||
+
|
||||
+ it "should not be the default provider on rhel7" do
|
||||
+ Facter.stubs(:value).with(:osfamily).returns(:redhat)
|
||||
+ Facter.stubs(:value).with(:operatingsystem).returns(:redhat)
|
||||
+ Facter.stubs(:value).with(:operatingsystemmajrelease).returns("7")
|
||||
+ expect(provider_class).to_not be_default
|
||||
+ end
|
||||
+
|
||||
+ it "should be the default provider on rhel8" do
|
||||
+ Facter.stubs(:value).with(:osfamily).returns(:redhat)
|
||||
+ Facter.stubs(:value).with(:operatingsystem).returns(:redhat)
|
||||
+ Facter.stubs(:value).with(:operatingsystemmajrelease).returns("8")
|
||||
+ expect(provider_class).to be_default
|
||||
+ end
|
||||
+
|
||||
end
|
||||
|
||||
describe provider_class do
|
||||
--
|
||||
2.19.2
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA512 (puppet-5.5.6.tar.gz) = 53bccc4cf3d4dde3079d96cd28b4cf380d004fdf67da8eaeaf70706ca5e1fe611910042f1aa03453fb29419bb9888a0eeef9a9d64e8f0cfe5d8d7a73e5bf5850
|
||||
SHA512 (puppet-5.5.6.tar.gz.asc) = 919303ae3f944236e52d2c1008f77e383ea2ee88c450fd00c197bc751f8fd3cd042bc6fd5f544a57b30a122f04db48418ee4d44319ecb996426fec311f7b83f2
|
||||
SHA512 (puppet-5.5.10.tar.gz) = 70a5684289fc576853bf908adff44c1b1ce4b37d71236e7d7a8d140fa0e3cdd46a4b570cc7e493a3f47641f6be0c3b736ab04a178c30cce4244abe686378bf4b
|
||||
SHA512 (puppet-5.5.10.tar.gz.asc) = 884e7f290c6dba7076f7e5c5038326d77997598252fbf432f0e6abcbb3fe676aa38ebe5d8df682e616fa757365de423dd074a174c5e4d4f699832fd6377bd487
|
||||
|
Loading…
Reference in new issue