From 2128b6bb4eaacec6ea9d7baf81f48f5a30355215 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 21 Apr 2022 14:22:47 +0200 Subject: [PATCH] Increase test coverage This adds tests for operatingsystemrelease / operatingsystemmajrelease --- spec/facts_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/facts_spec.rb b/spec/facts_spec.rb index 6a1916f3..abee51dd 100644 --- a/spec/facts_spec.rb +++ b/spec/facts_spec.rb @@ -117,6 +117,20 @@ 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 end end end