Skip to content

Commit

Permalink
Set nodename to prevent errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-larsson committed Feb 15, 2024
1 parent d0aeaf5 commit d7657bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/classes/data_types_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

on_supported_os(test_on).each do |_os, os_facts|
describe 'variable data type and content validations' do
let(:node) { 'data-types.example.com' }
# set needed custom facts and variables
let(:facts) do
os_facts.merge(
lsbmajdistrelease: os_facts[:os]['release']['major'], # Satisfy nisclient
fqdn: 'data-types.example.com',
)
end

Expand Down
1 change: 1 addition & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:node) { 'foo.example.com' }
let(:facts) do
os_facts.merge(
lsbmajdistrelease: os_facts[:os]['release']['major'], # Satisfy nisclient
Expand Down
1 change: 1 addition & 0 deletions spec/classes/parameter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

on_supported_os(test_on).each do |_os, os_facts|
describe 'parameter testing' do
let(:node) { 'foo.example.com' }
let(:facts) do
os_facts.merge(
lsbmajdistrelease: os_facts[:os]['release']['major'], # Satisfy nisclient
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/use_cases_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

on_supported_os.each do |os, os_facts|
context "on #{os} when value of vas_domain is an empty string (vasclnt package installed but not joined to an AD)" do
let(:node) { 'foo.example.com' }
let(:facts) do
os_facts.merge(
vas_domain: '',
Expand All @@ -23,6 +24,7 @@

on_supported_os.each do |os, os_facts|
context "on #{os} when value of vas_domain is undef (vasclnt package installed but not joined to an AD)" do
let(:node) { 'foo.example.com' }
let(:facts) do
os_facts.merge(
vas_domain: nil,
Expand Down

0 comments on commit d7657bc

Please sign in to comment.