Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix /info endpoint in smoke tests #7930

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class AsmStandaloneBillingSmokeTest extends AbstractAsmStandaloneBillingSmokeTes

then: 'Check if Datadog-Client-Computed-Stats header is present and set to true, Disabling the metrics computation agent-side'
waitForTraceCount(1)
def computedStatsHeader = server.lastRequest.headers.get('Datadog-Client-Computed-Stats')
lastTraceRequestHeaders != null
def computedStatsHeader = lastTraceRequestHeaders.get('Datadog-Client-Computed-Stats')
assert computedStatsHeader != null && computedStatsHeader == 'true'

then:'metrics should be disabled'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ abstract class AbstractSmokeTest extends ProcessManager {
@Shared
private Throwable traceDecodingFailure = null

@Shared
protected TestHttpServer.Headers lastTraceRequestHeaders = null

@Shared
@AutoCleanup
protected TestHttpServer server = httpServer {
Expand All @@ -48,7 +51,7 @@ abstract class AbstractSmokeTest extends ProcessManager {
"endpoints": [
"/v0.4/traces",
"/v0.5/traces",
"/telemetry/proxy/",
"/telemetry/proxy/"
],
"client_drop_p0s": true,
"span_meta_structs": true,
Expand Down Expand Up @@ -82,6 +85,7 @@ abstract class AbstractSmokeTest extends ProcessManager {
}
}
traceCount.addAndGet(count)
lastTraceRequestHeaders = request.headers
println("Received v0.4 traces: " + countString)
response.status(200).send()
}
Expand All @@ -104,9 +108,13 @@ abstract class AbstractSmokeTest extends ProcessManager {
}
}
traceCount.addAndGet(count)
lastTraceRequestHeaders = request.headers
println("Received v0.5 traces: " + countString)
response.status(200).send()
}
prefix("/v0.6/stats") {
response.status(200).send()
}
prefix("/v0.7/config") {
response.status(200).send(remoteConfigResponse)
}
Expand Down