Skip to content

Commit

Permalink
Fill facts with values checks by apt puppet module
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz committed Oct 24, 2023
1 parent 01c8133 commit 81206e6
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 20 deletions.
32 changes: 28 additions & 4 deletions spec/classes/datadog_agent_redhat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'Fedora',
'release' => {
'major' => '36',
'full' => '36',
},
},
}
end
Expand Down Expand Up @@ -70,6 +74,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'Fedora',
'release' => {
'major' => '36',
'full' => '36',
},
},
}
end
Expand Down Expand Up @@ -125,6 +133,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'Fedora',
'release' => {
'major' => '36',
'full' => '36',
},
},
}
end
Expand Down Expand Up @@ -183,7 +195,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'RedHat',
'release' => { 'full' => '8.1' },
'release' => {
'major' => '8',
'full' => '8.1',
},
},
}
end
Expand Down Expand Up @@ -222,7 +237,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'RedHat',
'release' => { 'full' => '8.2' },
'release' => {
'major' => '8',
'full' => '8.2',
},
},
}
end
Expand Down Expand Up @@ -261,7 +279,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'AlmaLinux',
'release' => { 'full' => '8.5' },
'release' => {
'major' => '8',
'full' => '8.5',
},
},
}
end
Expand Down Expand Up @@ -299,7 +320,10 @@
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'Rocky',
'release' => { 'full' => '8.5' },
'release' => {
'major' => '8',
'full' => '8.5',
},
},
}
end
Expand Down
26 changes: 25 additions & 1 deletion spec/classes/datadog_agent_reports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
osfamily: getosfamily(operatingsystem),
operatingsystemrelease: getosrelease(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
'name' => operatingsystem,
'release' => { 'full' => getosrelease(operatingsystem) },
'release' => {
'major' => getosmajor(operatingsystem),
'full' => getosrelease(operatingsystem),
},
},
}
end
Expand Down Expand Up @@ -90,8 +94,13 @@
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Debian',
'release' => {
'major' => '8',
'full' => '8.1',
},
},
}
end
Expand Down Expand Up @@ -138,8 +147,13 @@
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Debian',
'release' => {
'major' => '8',
'full' => '8.1',
},
},
}
end
Expand Down Expand Up @@ -181,8 +195,13 @@
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Debian',
'release' => {
'major' => '8',
'full' => '8.1',
},
},
}
end
Expand Down Expand Up @@ -226,8 +245,13 @@
operatingsystem: 'Debian',
osfamily: 'debian',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Debian',
'release' => {
'major' => '8',
'full' => '8.1',
},
},
}
end
Expand Down
89 changes: 87 additions & 2 deletions spec/classes/datadog_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
osfamily: 'Solaris',
operatingsystem: 'Nexenta',
os: {
'architecture' => 'x86_64',
'family' => 'Solaris',
'name' => 'Nexenta',
'release' => {
'major' => '3',
'full' => '3.0',
},
},
}
end
Expand All @@ -34,8 +39,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -57,8 +67,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -80,8 +95,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -103,8 +123,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -126,8 +151,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -149,8 +179,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -172,8 +207,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -197,8 +237,13 @@
osfamily: 'debian',
operatingsystem: 'Ubuntu',
os: {
'architecture' => 'x86_64',
'family' => 'debian',
'name' => 'Ubuntu',
'release' => {
'major' => '14',
'full' => '14.04',
},
},
}
end
Expand All @@ -218,8 +263,13 @@
osfamily: 'windows',
operatingsystem: 'Windows',
os: {
'architecture' => 'x86_64',
'family' => 'windows',
'name' => 'Windows',
'release' => {
'major' => '2019',
'full' => '2019 SP1',
},
},
}
end
Expand Down Expand Up @@ -269,8 +319,13 @@
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
'name' => operatingsystem,
'release' => {
'major' => getosmajor(operatingsystem),
'full' => getosrelease(operatingsystem),
},
},
}
end
Expand Down Expand Up @@ -315,8 +370,13 @@
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
'name' => operatingsystem,
'release' => {
'major' => getosmajor(operatingsystem),
'full' => getosrelease(operatingsystem),
},
},
}
end
Expand Down Expand Up @@ -1671,8 +1731,13 @@
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
'name' => operatingsystem,
'release' => {
'major' => getosmajor(operatingsystem),
'full' => getosrelease(operatingsystem),
},
},
}
end
Expand Down Expand Up @@ -1701,8 +1766,13 @@
operatingsystem: operatingsystem,
osfamily: getosfamily(operatingsystem),
os: {
'architecture' => 'x86_64',
'family' => getosfamily(operatingsystem),
'name' => operatingsystem,
'release' => {
'major' => getosmajor(operatingsystem),
'full' => getosrelease(operatingsystem),
},
},
}
end
Expand Down Expand Up @@ -2313,9 +2383,14 @@
{
'operatingsystem' => 'CentOS',
'osfamily' => 'redhat',
os => {
'os' => {
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'CentOS',
'release' => {
'major' => '6',
'full' => '6.3',
},
},
}
end
Expand Down Expand Up @@ -2360,9 +2435,14 @@
},
},
'looks.like.a.path' => 'but_its_not',
os => {
'os' => {
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'CentOS',
'release' => {
'major' => '6',
'full' => '6.3',
},
},
}
end
Expand All @@ -2387,8 +2467,13 @@
osfamily: 'redhat',
facts_array: ['one', 'two'],
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'CentOS',
'release' => {
'major' => '6',
'full' => '6.3',
},
},
}
end
Expand Down
Loading

0 comments on commit 81206e6

Please sign in to comment.