Skip to content

Commit

Permalink
Remove legacy Facts from Rspec-Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cocker-cc committed Oct 24, 2023
1 parent 7ff14d8 commit fb62320
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 96 deletions.
1 change: 0 additions & 1 deletion spec/classes/datadog_agent_integrations_haproxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
let(:pre_condition) { "class {'::datadog_agent': agent_major_version => #{agent_major_version}}" }
let(:facts) do
{
ipaddress: '1.2.3.4',
networking: { 'ip' => '1.2.3.4' },
}
end
Expand Down
25 changes: 0 additions & 25 deletions spec/classes/datadog_agent_redhat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'Fedora',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -67,9 +64,6 @@
context 'agent 6' do
let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'Fedora',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -126,9 +120,6 @@
context 'agent 7' do
let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'Fedora',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -187,10 +178,6 @@
# we expect repo_gpgcheck to be false on 8.1
let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'RedHat',
operatingsystemrelease: '8.1',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -229,10 +216,6 @@
# we expect repo_gpgcheck to be true on 8.2 (and later)
let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'RedHat',
operatingsystemrelease: '8.2',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -271,10 +254,6 @@
context 'almalinux 8', if: min_puppet_version('7.12.0') do
let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'AlmaLinux',
operatingsystemrelease: '8.5',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -312,10 +291,6 @@
context 'rocky 8', if: min_puppet_version('7.12.0') do
let(:facts) do
{
osfamily: 'redhat',
operatingsystem: 'Rocky',
operatingsystemrelease: '8.5',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down
11 changes: 0 additions & 11 deletions spec/classes/datadog_agent_reports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
describe "datadog_agent class common actions on #{operatingsystem}" do
let(:facts) do
{
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
operatingsystemrelease: getosrelease(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
Expand Down Expand Up @@ -90,8 +87,6 @@
describe 'datadog_agent class dogapi version override' do
let(:facts) do
{
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -141,8 +136,6 @@
describe 'datadog_agent class puppet gem provider override' do
let(:facts) do
{
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -187,8 +180,6 @@
describe 'datadog_agent class dogapi version override' do
let(:facts) do
{
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -235,8 +226,6 @@
describe 'datadog_agent class dogapi version override' do
let(:facts) do
{
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down
34 changes: 0 additions & 34 deletions spec/classes/datadog_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
describe 'datadog_agent class without any parameters on Solaris/Nexenta' do
let(:facts) do
{
osfamily: 'Solaris',
operatingsystem: 'Nexenta',
os: {
'architecture' => 'x86_64',
'family' => 'Solaris',
Expand Down Expand Up @@ -36,8 +34,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -64,8 +60,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -92,8 +86,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -120,8 +112,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -148,8 +138,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -176,8 +164,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -204,8 +190,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -234,8 +218,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -260,8 +242,6 @@
context 'windows NPM' do
let(:facts) do
{
osfamily: 'windows',
operatingsystem: 'Windows',
os: {
'architecture' => 'x86_64',
'family' => 'windows',
Expand Down Expand Up @@ -316,8 +296,6 @@
ALL_OS.each do |operatingsystem|
let(:facts) do
{
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
Expand Down Expand Up @@ -367,8 +345,6 @@
end
let(:facts) do
{
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
Expand Down Expand Up @@ -1728,8 +1704,6 @@
end
let(:facts) do
{
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
Expand Down Expand Up @@ -1763,8 +1737,6 @@
end
let(:facts) do
{
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
Expand Down Expand Up @@ -2381,8 +2353,6 @@
end
let(:facts) do
{
'operatingsystem' => 'CentOS',
'osfamily' => 'redhat',
'os' => {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -2425,8 +2395,6 @@
end
let(:facts) do
{
'operatingsystem' => 'CentOS',
'osfamily' => 'redhat',
'facts_array' => ['one', 'two'],
'facts_hash' => {
'actor' => {
Expand Down Expand Up @@ -2463,8 +2431,6 @@
end
let(:facts) do
{
operatingsystem: 'CentOS',
osfamily: 'redhat',
facts_array: ['one', 'two'],
os: {
'architecture' => 'x86_64',
Expand Down
4 changes: 0 additions & 4 deletions spec/classes/datadog_agent_suse_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

let(:facts) do
{
operatingsystem: 'OpenSuSE',
architecture: 'x86_64',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand All @@ -24,7 +22,6 @@
context 'suse >= 15' do
let(:facts) do
{
operatingsystemmajrelease: '15',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down Expand Up @@ -81,7 +78,6 @@
context 'suse < 15' do
let(:facts) do
{
operatingsystemmajrelease: '14',
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
Expand Down
18 changes: 0 additions & 18 deletions spec/classes/datadog_agent_ubuntu_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
end
let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -88,8 +86,6 @@

let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -142,8 +138,6 @@

let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down Expand Up @@ -193,9 +187,6 @@

let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
operatingsystemrelease: '14.04',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -220,9 +211,6 @@

let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Ubuntu',
operatingsystemrelease: '16.04',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -247,9 +235,6 @@

let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Debian',
operatingsystemrelease: '8.0',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand All @@ -274,9 +259,6 @@

let(:facts) do
{
osfamily: 'debian',
operatingsystem: 'Debian',
operatingsystemrelease: '9.0',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
Expand Down
3 changes: 0 additions & 3 deletions spec/defines/datadog_agent__install_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
ALL_OS.each do |operatingsystem|
let(:facts) do
{
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
operatingsystemrelease: getosrelease(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
Expand Down

0 comments on commit fb62320

Please sign in to comment.