-
Notifications
You must be signed in to change notification settings - Fork 259
Expand file tree
/
Copy pathdatadog_agent_suse_spec.rb
More file actions
52 lines (45 loc) · 1.24 KB
/
datadog_agent_suse_spec.rb
File metadata and controls
52 lines (45 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'spec_helper'
describe 'datadog_agent::suse' do
if RSpec::Support::OS.windows?
return
end
let(:facts) do
{
operatingsystem: 'OpenSuSE',
architecture: 'x86_64',
}
end
context 'agent 6' do
let(:params) do
{
agent_major_version: 6,
}
end
it do
is_expected.to contain_zypprepo('datadog')
.with_enabled(1)\
.with_gpgcheck(1)\
.with_gpgkey('https://yum.datadoghq.com/DATADOG_RPM_KEY.public https://yum.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public https://yum.datadoghq.com/DATADOG_RPM_KEY_20200908.public')\
.with_baseurl('https://yum.datadoghq.com/suse/stable/6/x86_64')
end
end
context 'agent 7' do
let(:params) do
{
agent_major_version: 7,
}
end
it do
is_expected.to contain_zypprepo('datadog')
.with_enabled(1)\
.with_gpgcheck(1)\
.with_gpgkey('https://yum.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public https://yum.datadoghq.com/DATADOG_RPM_KEY_20200908.public')\
.with_baseurl('https://yum.datadoghq.com/suse/stable/7/x86_64')
end
end
# it should install the packages
it do
is_expected.to contain_package('datadog-agent')\
.with_ensure('latest')
end
end