Skip to content

Commit

Permalink
remove agent 5
Browse files Browse the repository at this point in the history
  • Loading branch information
fanny-jiang committed Feb 14, 2025
1 parent 5e3f941 commit a4c7b88
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 1,821 deletions.
431 changes: 160 additions & 271 deletions manifests/init.pp

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions spec/classes/datadog_agent_integrations_kafka_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
context 'supported agents' do
let(:pre_condition) { "class {'::datadog_agent': agent_major_version => #{agent_major_version}}" }

conf_file = if agent_major_version == 5
'/etc/dd-agent/conf.d/kafka.yaml'
else
"#{CONF_DIR}/kafka.d/conf.yaml"
end
conf_file = "#{CONF_DIR}/kafka.d/conf.yaml"

it { is_expected.to compile.with_all_deps }
it {
Expand Down
60 changes: 0 additions & 60 deletions spec/classes/datadog_agent_redhat_spec.rb
Original file line number Diff line number Diff line change
@@ -1,66 +1,6 @@
require 'spec_helper'

describe 'datadog_agent::redhat' do
context 'agent 5' do
if RSpec::Support::OS.windows?
return
end

let(:facts) do
{
os: {
'architecture' => 'x86_64',
'family' => 'redhat',
'name' => 'Fedora',
'release' => {
'major' => '36',
'full' => '36',
},
},
}
end

# it should install the mirror
context 'with manage_repo => true' do
let(:params) do
{
manage_repo: true,
agent_major_version: 5,
}
end

it do
is_expected.to contain_yumrepo('datadog')
.with_enabled(1)\
.with_gpgcheck(1)\
.with_gpgkey('https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public')\
.with_baseurl('https://yum.datadoghq.com/rpm/x86_64/')\
.with_repo_gpgcheck(false)
end
end
context 'with manage_repo => false' do
let(:params) do
{
manage_repo: false, agent_major_version: 5
}
end

it do
is_expected.not_to contain_yumrepo('datadog')
is_expected.not_to contain_yumrepo('datadog5')
is_expected.not_to contain_yumrepo('datadog6')
end
end
# it should install the packages
it do
is_expected.to contain_package('datadog-agent')\
.with_ensure('latest')
end
end

context 'agent 6' do
let(:facts) do
{
Expand Down
Loading

0 comments on commit a4c7b88

Please sign in to comment.