Skip to content

Commit 6e9e28d

Browse files
committed
Change datadog_agent test
1 parent d9c2288 commit 6e9e28d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/mocks/http_clients.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@ struct MockHTTPClient : public HTTPClient {
3939
ResponseHandler on_response_;
4040
ErrorHandler on_error_;
4141

42-
Expected<void> post(const URL& url, HeadersSetter set_headers,
42+
Expected<void> post(const URL& /* url */, HeadersSetter set_headers,
4343
std::string /*body*/, ResponseHandler on_response,
4444
ErrorHandler on_error) override {
45-
if (url.path != "/v0.4/traces") {
46-
return {};
47-
}
4845
std::lock_guard<std::mutex> lock{mutex_};
4946
if (!post_error) {
5047
on_response_ = on_response;

test/test_datadog_agent.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ TEST_CASE("CollectorResponse") {
2222
config.logger = logger;
2323
config.agent.event_scheduler = event_scheduler;
2424
config.agent.http_client = http_client;
25+
// Tests currently only cover sending traces to the agent.
26+
// Submiting telemetry performs essentially the same steps, but may be added
27+
// in the future.
28+
config.report_telemetry = false;
2529
auto finalized = finalize_config(config);
2630
REQUIRE(finalized);
2731

0 commit comments

Comments
 (0)