Skip to content

Commit

Permalink
Use modern facts in acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Nov 12, 2023
1 parent c398f96 commit 8ae2b15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/acceptance/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,7 +18,7 @@ class { 'dhcp':
mask => $interface['netmask'],
}
dhcp::host { $facts['fqdn']:
dhcp::host { $facts['networking']['fqdn']:
ip => $interface['ip'],
mac => $interface['mac'],
}
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/nameservers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ae2b15

Please sign in to comment.