File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 566566 $_agent_config = {
567567 ' api_key' => $api_key ,
568568 ' dd_url' => $dd_url ,
569+ ' hostname' => $host ,
569570 ' cmd_port' => 5001,
570571 ' conf_path' => $datadog_agent::params::conf6_dir ,
571572 ' enable_metadata_collection' => $collect_instance_metadata ,
Original file line number Diff line number Diff line change 922922 end
923923 end
924924
925- context 'with apm_extra_config' do
925+ context 'with modified defaults' do
926+ context 'hostname override' do
927+ let ( :params ) { {
928+ :host => 'my_custom_hostname' ,
929+ } }
930+ it { should contain_file ( '/etc/datadog-agent/datadog.yaml' ) . with (
931+ 'content' => /^hostname: my_custom_hostname\n / ,
932+ ) }
933+ end
934+ end
935+
936+ context 'with additional agents config' do
926937 context 'with extra_options and APM enabled' do
927938 let ( :params ) { {
928939 :apm_enabled => true ,
You can’t perform that action at this time.
0 commit comments