From 51864bca5bdc78fdec8c84f5c631455e3510d901 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Sat, 11 Nov 2023 19:47:08 +0100 Subject: [PATCH 1/2] Use modern facts in acceptance tests --- spec/acceptance/basic_spec.rb | 4 ++-- spec/acceptance/nameservers_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/acceptance/basic_spec.rb b/spec/acceptance/basic_spec.rb index 7e73423..a403fa1 100644 --- a/spec/acceptance/basic_spec.rb +++ b/spec/acceptance/basic_spec.rb @@ -2,7 +2,7 @@ describe 'Simple installation' do interface = 'eth0' - config_file = fact('osfamily') == 'Archlinux' ? '/etc/dhcpd.conf' : '/etc/dhcp/dhcpd.conf' + config_file = fact('os.family') == 'Archlinux' ? '/etc/dhcpd.conf' : '/etc/dhcp/dhcpd.conf' it_behaves_like 'an idempotent resource' do let(:manifest) do @@ -18,7 +18,7 @@ class { 'dhcp': mask => $interface['netmask'], } - dhcp::host { $facts['fqdn']: + dhcp::host { $facts['networking']['fqdn']: ip => $interface['ip'], mac => $interface['mac'], } diff --git a/spec/acceptance/nameservers_spec.rb b/spec/acceptance/nameservers_spec.rb index 444b840..cebea92 100644 --- a/spec/acceptance/nameservers_spec.rb +++ b/spec/acceptance/nameservers_spec.rb @@ -2,7 +2,7 @@ describe 'with empty nameservers list' do interface = 'eth0' - config_file = fact('osfamily') == 'Archlinux' ? '/etc/dhcpd.conf' : '/etc/dhcp/dhcpd.conf' + config_file = fact('os.family') == 'Archlinux' ? '/etc/dhcpd.conf' : '/etc/dhcp/dhcpd.conf' it_behaves_like 'an idempotent resource' do let(:manifest) do From d47d0bd4366cf677a0a8b5c54492d34b0a7d6b47 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Wed, 10 May 2023 19:04:12 +0200 Subject: [PATCH 2/2] Add Puppet 8 support --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index fbe3b8d..2c3d02b 100644 --- a/metadata.json +++ b/metadata.json @@ -31,7 +31,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 7.0.0 < 8.0.0" + "version_requirement": ">= 7.0.0 < 9.0.0" } ], "operatingsystem_support": [