Skip to content

Commit 44ac386

Browse files
authored
Fix /info endpoint in smoke tests (#7930)
1 parent 31bfaf7 commit 44ac386

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

dd-smoke-tests/asm-standalone-billing/src/test/groovy/datadog/smoketest/asmstandalonebilling/AsmStandaloneBillingSmokeTest.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class AsmStandaloneBillingSmokeTest extends AbstractAsmStandaloneBillingSmokeTes
6060

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

6667
then:'metrics should be disabled'

dd-smoke-tests/src/main/groovy/datadog/smoketest/AbstractSmokeTest.groovy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ abstract class AbstractSmokeTest extends ProcessManager {
3737
@Shared
3838
private Throwable traceDecodingFailure = null
3939

40+
@Shared
41+
protected TestHttpServer.Headers lastTraceRequestHeaders = null
42+
4043
@Shared
4144
@AutoCleanup
4245
protected TestHttpServer server = httpServer {
@@ -48,7 +51,7 @@ abstract class AbstractSmokeTest extends ProcessManager {
4851
"endpoints": [
4952
"/v0.4/traces",
5053
"/v0.5/traces",
51-
"/telemetry/proxy/",
54+
"/telemetry/proxy/"
5255
],
5356
"client_drop_p0s": true,
5457
"span_meta_structs": true,
@@ -82,6 +85,7 @@ abstract class AbstractSmokeTest extends ProcessManager {
8285
}
8386
}
8487
traceCount.addAndGet(count)
88+
lastTraceRequestHeaders = request.headers
8589
println("Received v0.4 traces: " + countString)
8690
response.status(200).send()
8791
}
@@ -104,9 +108,13 @@ abstract class AbstractSmokeTest extends ProcessManager {
104108
}
105109
}
106110
traceCount.addAndGet(count)
111+
lastTraceRequestHeaders = request.headers
107112
println("Received v0.5 traces: " + countString)
108113
response.status(200).send()
109114
}
115+
prefix("/v0.6/stats") {
116+
response.status(200).send()
117+
}
110118
prefix("/v0.7/config") {
111119
response.status(200).send(remoteConfigResponse)
112120
}

0 commit comments

Comments
 (0)