File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 833833 end
834834
835835 if DEBIAN_OS . include? ( operatingsystem )
836- it { should contain_class ( 'datadog_agent::ubuntu::agent5' ) }
836+ it do
837+ should contain_class ( 'datadog_agent::ubuntu::agent5' ) \
838+ . with_apt_keyserver ( 'hkp://keyserver.ubuntu.com:80' )
839+ end
840+ context 'use backup keyserver' do
841+ let ( :params ) { {
842+ :use_apt_backup_keyserver => true ,
843+ :agent5_enable => true ,
844+ } }
845+ it do
846+ should contain_class ( 'datadog_agent::ubuntu::agent5' ) \
847+ . with_apt_keyserver ( 'hkp://pool.sks-keyservers.net:80' )
848+ end
849+ end
837850 elsif REDHAT_OS . include? ( operatingsystem )
838851 it { should contain_class ( 'datadog_agent::redhat::agent5' ) }
839852 end
Original file line number Diff line number Diff line change 1717
1818 # it should install the mirror
1919 it { should_not contain_datadog_agent__ubuntu__install_key ( '935F5A436A5A6E8788F0765B226AE980C7A7DA52' ) }
20- it { should contain_datadog_agent__ubuntu__install_key ( 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE' ) }
20+ it do
21+ should contain_datadog_agent__ubuntu__install_key ( 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE' ) \
22+ end
23+ context 'overriding keyserver' do
24+ let ( :params ) { {
25+ apt_keyserver : 'hkp://pool.sks-keyservers.net:80' ,
26+ } }
27+ it do
28+ should contain_datadog_agent__ubuntu__install_key ( 'A2923DFF56EDA6E76E55E492D3A80E30382E94DE' ) \
29+ . with_server ( 'hkp://pool.sks-keyservers.net:80' )
30+ end
31+ end
32+
2133 it do
2234 should contain_file ( '/etc/apt/sources.list.d/datadog.list' ) \
2335 . that_notifies ( 'exec[apt_update]' )
You can’t perform that action at this time.
0 commit comments