Skip to content

Commit

Permalink
Fix /info endpoint in smoke tests (#7930)
Browse files Browse the repository at this point in the history
  • Loading branch information
smola authored Nov 11, 2024
1 parent 31bfaf7 commit 44ac386
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
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

0 comments on commit 44ac386

Please sign in to comment.