-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
520e952
commit d7277c9
Showing
13 changed files
with
69 additions
and
31 deletions.
There are no files selected for viewing
Submodule integrations-core
updated
3586 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpClientTest2.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package datadog.trace.agent.test.base | ||
|
||
import datadog.trace.core.datastreams.StatsGroup | ||
|
||
// This class tests multiline multivalue headers for those classes that support it. | ||
abstract class HttpClientTest2 extends HttpClientTest{ | ||
|
||
def "test request header #header tag mapping"() { | ||
when: | ||
def url = server.address.resolve("/success") | ||
def status = (value2 == null) ? doRequest(method, url, [[header, value]]) : doRequest(method, url, [[header, value], [header, value2]]) | ||
if (isDataStreamsEnabled()) { | ||
TEST_DATA_STREAMS_WRITER.waitForGroups(1) | ||
} | ||
|
||
then: | ||
status == 200 | ||
assertTraces(2) { | ||
trace(size(1)) { | ||
clientSpan(it, null, method, false, false, url, status, false, null, false, tags) | ||
} | ||
server.distributedRequestTrace(it, trace(0).last(), tags) | ||
} | ||
and: | ||
if (isDataStreamsEnabled()) { | ||
StatsGroup first = TEST_DATA_STREAMS_WRITER.groups.find { it.parentHash == 0 } | ||
verifyAll(first) { | ||
edgeTags.containsAll(DSM_EDGE_TAGS) | ||
edgeTags.size() == DSM_EDGE_TAGS.size() | ||
} | ||
} | ||
|
||
where: | ||
method | header | value | value2 | tags | ||
'GET' | 'X-Datadog-Test-Both-Header' | 'foo' | null | [ 'both_header_tag': 'foo' ] | ||
'GET' | 'X-Datadog-Test-Request-Header' | 'bar' | null | [ 'request_header_tag': 'bar' ] | ||
'GET' | 'X-Datadog-Test-Both-Header' | 'bar,baz' | null | [ 'both_header_tag': 'bar,baz' ] | ||
'GET' | 'X-Datadog-Test-Request-Header' | 'foo,bar' | null | [ 'request_header_tag': 'foo,bar' ] | ||
'GET' | 'X-Datadog-Test-Both-Header' | 'bar,baz' | 'foo' | [ 'both_header_tag': 'bar,baz,foo' ] | ||
'GET' | 'X-Datadog-Test-Request-Header' | 'foo,bar' | 'baz' | [ 'request_header_tag': 'foo,bar,baz' ] | ||
} | ||
} |