diff --git a/test/kitchen/test/integration/common/rspec/spec_helper.rb b/test/kitchen/test/integration/common/rspec/spec_helper.rb index becbfc52e698e..a4a940814fa39 100644 --- a/test/kitchen/test/integration/common/rspec/spec_helper.rb +++ b/test/kitchen/test/integration/common/rspec/spec_helper.rb @@ -550,11 +550,24 @@ def is_dpkg_package_installed(package) end shared_examples_for "a running Agent with APM" do + if os == :windows + it 'has the apm agent running' do + expect(is_process_running?("trace-agent.exe")).to be_truthy + expect(is_service_running?("datadog-trace-agent")).to be_truthy + end + end it 'is bound to the port that receives traces by default' do expect(is_port_bound(8126)).to be_truthy end end +shared_examples_for "a running Agent with process enabled" do + it 'has the process agent running' do + expect(is_process_running?("process-agent.exe")).to be_truthy + expect(is_service_running?("datadog-process-agent")).to be_truthy + end +end + shared_examples_for "a running Agent with APM manually disabled" do it 'is not bound to the port that receives traces when apm_enabled is set to false' do conf_path = "" @@ -845,11 +858,6 @@ def is_dpkg_package_installed(package) expect(confYaml).to have_key("apm_config") expect(confYaml["apm_config"]).to have_key("enabled") expect(confYaml["apm_config"]["enabled"]).to be_truthy - expect(is_port_bound(8126)).to be_truthy - end - it 'has the apm agent running' do - expect(is_process_running?("trace-agent.exe")).to be_truthy - expect(is_service_running?("datadog-trace-agent")).to be_truthy end end @@ -870,10 +878,6 @@ def is_dpkg_package_installed(package) expect(confYaml["process_config"]["process_collection"]).to have_key("enabled") expect(confYaml["process_config"]["process_collection"]["enabled"]).to be_truthy end - it 'has the process agent running' do - expect(is_process_running?("process-agent.exe")).to be_truthy - expect(is_service_running?("datadog-process-agent")).to be_truthy - end end shared_examples_for 'an upgraded Agent with the expected version' do diff --git a/test/kitchen/test/integration/win-all-subservices/rspec/win-all-subservices_spec.rb b/test/kitchen/test/integration/win-all-subservices/rspec/win-all-subservices_spec.rb index 0cf8e828f27f8..8ce9dc96f6656 100644 --- a/test/kitchen/test/integration/win-all-subservices/rspec/win-all-subservices_spec.rb +++ b/test/kitchen/test/integration/win-all-subservices/rspec/win-all-subservices_spec.rb @@ -4,9 +4,11 @@ describe 'win-all-subservices' do it_behaves_like 'an installed Agent' - it_behaves_like 'a running Agent with no errors' it_behaves_like 'an Agent with APM enabled' it_behaves_like 'an Agent with logs enabled' it_behaves_like 'an Agent with process enabled' + it_behaves_like 'a running Agent with no errors' + it_behaves_like 'a running Agent with APM' + it_behaves_like 'a running Agent with process enabled' end \ No newline at end of file diff --git a/test/kitchen/test/integration/win-user/rspec/win-user_spec.rb b/test/kitchen/test/integration/win-user/rspec/win-user_spec.rb index ec3e2a583c61d..d915f0c7d9a43 100644 --- a/test/kitchen/test/integration/win-user/rspec/win-user_spec.rb +++ b/test/kitchen/test/integration/win-user/rspec/win-user_spec.rb @@ -148,9 +148,11 @@ end describe 'dd-agent-win-user' do # it_behaves_like 'an installed Agent' - it_behaves_like 'a running Agent with no errors' it_behaves_like 'an Agent with APM enabled' it_behaves_like 'an Agent with process enabled' it_behaves_like 'an Agent with valid permissions' + it_behaves_like 'a running Agent with no errors' + it_behaves_like 'a running Agent with APM' + it_behaves_like 'a running Agent with process enabled' end \ No newline at end of file