Skip to content

Commit

Permalink
Increase test coverage
Browse files Browse the repository at this point in the history
This adds tests for operatingsystemrelease / operatingsystemmajrelease
  • Loading branch information
bastelfreak committed May 18, 2024
1 parent 584ab02 commit 885be64
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions spec/facts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,28 @@
expect(content['systemd_version']).to be_nil
expect(content['systemd_internal_services']).to be_nil
end

it 'contains a legacy hostname, domain and fqdn fact' do
expect(content['hostname']).to eq('foo')
expect(content['fqdn']).to eq('foo.example.com')
expect(content['domain']).to eq('example.com')
end

it 'contains the legacy osfamily fact' do
expect(content['osfamily']).not_to be_nil
end

it 'contains the legacy operatingsystem fact' do
expect(content['operatingsystem']).not_to be_nil
end

it 'contains the legacy operatingsystemrelease fact' do
expect(content['operatingsystemrelease']).not_to be_nil
end

it 'contains the legacy operatingsystemmajrelease fact' do
expect(content['operatingsystemmajrelease']).not_to be_nil
end
end
end
end

0 comments on commit 885be64

Please sign in to comment.