File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 15921592
15931593 config_dir = WINDOWS_OS . include? ( operatingsystem ) ? 'C:/ProgramData/Datadog' : '/etc/datadog-agent'
15941594 config_yaml_file = config_dir + '/datadog.yaml'
1595+ install_info_file = config_dir + '/install_info'
15951596 log_file = WINDOWS_OS . include? ( operatingsystem ) ? 'C:/ProgramData/Datadog/logs/agent.log' : '\/var\/log\/datadog\/agent.log'
15961597
15971598 it { is_expected . to contain_file ( config_dir ) }
15981599 it { is_expected . to contain_file ( config_yaml_file ) }
1600+ it { is_expected . to contain_file ( install_info_file ) }
15991601 it { is_expected . to contain_file ( config_dir + '/conf.d' ) . with_ensure ( 'directory' ) }
16001602
16011603 # Agent 5 files
16021604 it { is_expected . not_to contain_file ( '/etc/dd-agent' ) }
16031605 it { is_expected . not_to contain_concat ( '/etc/dd-agent/datadog.conf' ) }
16041606 it { is_expected . not_to contain_file ( '/etc/dd-agent/conf.d' ) . with_ensure ( 'directory' ) }
16051607
1608+ describe "install_info check" do
1609+ it {
1610+ is_expected . to contain_file ( install_info_file ) . with (
1611+ 'content' => %r{^\ \ tool:puppet} ,
1612+ )
1613+ }
1614+ it {
1615+ is_expected . to contain_file ( install_info_file ) . with (
1616+ 'content' => %r{^\ \ tool_version:puppet-[0-9]\. [0-9]\. [0-9]} ,
1617+ )
1618+ }
1619+ it {
1620+ is_expected . to contain_file ( install_info_file ) . with (
1621+ 'content' => %r{^\ \ installer_version:datadog_module-[0-9]\. [0-9]\. [0-9]} ,
1622+ )
1623+ }
1624+ end
1625+
16061626 describe 'agent6 parameter check' do
16071627 context 'with defaults' do
16081628 context 'for basic beta settings' do
You can’t perform that action at this time.
0 commit comments