Nit in tests (while installing a specific version).
MODIFY
spec/dd-agent_spec.rb
spec/dd-agent_spec.rb
@@ -264,7 +264,7 @@ describe 'datadog::dd-agent' do
end
end
- # TODO(remy): something to do here?
+ # TODO(remy): remove Agent v4 occurrences + needs some clean-up
context 'allows a hash for agent version' do
context 'when ubuntu' do
cached(:chef_run) do
@@ -277,9 +277,12 @@ describe 'datadog::dd-agent' do
'api_key' => 'somethingnotnil',
'agent_version' => {
'debian' => '1:5.9.0-1',
- 'rhel' => '4.4.0-200',
'windows' => '4.4.0'
+ },
+ 'agent6_version' => {
+ 'rhel' => '1:6.9.0-1'
}
+
}
end.converge described_recipe
end
@@ -302,9 +305,12 @@ describe 'datadog::dd-agent' do
'api_key' => 'somethingnotnil',
'agent_version' => {
'debian' => '1:5.9.0-1',
- 'rhel' => '4.4.0-200',
'windows' => '4.4.0'
+ },
+ 'agent6_version' => {
+ 'rhel' => '1:6.9.0-1'
}
+
}
end.converge described_recipe
end
@@ -329,19 +335,21 @@ describe 'datadog::dd-agent' do
:version => '25'
) do |node|
node.set['datadog'] = {
- 'agent6' => false,
+ 'agent6' => true,
'api_key' => 'somethingnotnil',
'agent_version' => {
'debian' => '1:5.9.0-1',
- 'rhel' => '4.4.0-200',
'windows' => '4.4.0'
+ },
+ 'agent6_version' => {
+ 'rhel' => '1:6.9.0-1'
}
}
end.converge described_recipe
end
it 'installs agent 4.4.0-200' do
- expect(chef_run).to install_package('datadog-agent').with(version: '4.4.0-200')
+ expect(chef_run).to install_package('datadog-agent').with(version: '1:6.9.0-1')
end
end
@@ -352,19 +360,22 @@ describe 'datadog::dd-agent' do
:version => '6.9'
) do |node|
node.set['datadog'] = {
- 'agent6' => false,
+ 'agent6' => true,
'api_key' => 'somethingnotnil',
'agent_version' => {
'debian' => '1:5.9.0-1',
- 'rhel' => '4.4.0-200',
'windows' => '4.4.0'
+ },
+ 'agent6_version' => {
+ 'rhel' => '1:6.9.0-1'
}
+
}
end.converge described_recipe
end
it 'installs agent 4.4.0-200' do
- expect(chef_run).to install_package('datadog-agent').with(version: '4.4.0-200')
+ expect(chef_run).to install_package('datadog-agent').with(version: '1:6.9.0-1')
end
end
end

Nit in tests (while installing a specific version).