Skip to content
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 @@ -71,6 +71,15 @@ public void tearDown() throws IOException {
}
}

@Test
void testUnixDomainSocket() {
when(config.getAgentUnixDomainSocket()).thenReturn("/tmp/ddagent/agent.sock");
uploader = new BatchUploader(config, "http://localhost:8126");
assertEquals(
"datadog.common.socket.UnixDomainSocketFactory",
uploader.getClient().socketFactory().getClass().getTypeName());
}

@Test
void testOkHttpClientForcesCleartextConnspecWhenNotUsingTLS() {
uploader = new BatchUploader(config, "http://example.com");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2465,4 +2465,18 @@ class ConfigTest extends DDSpecification {
"auto" | true | PROFILING_START_DELAY_DEFAULT | PROFILING_START_FORCE_FIRST_DEFAULT
// spotless:on
}

def "url for debugger with unix domain socket"() {
when:
def prop = new Properties()
prop.setProperty(AGENT_HOST, "myhost")
prop.setProperty(TRACE_AGENT_PORT, "1234")
prop.setProperty(TRACE_AGENT_URL, "unix:///path/to/socket")

Config config = Config.get(prop)

then:
config.finalDebuggerSnapshotUrl == "http://localhost:8126/debugger/v1/input"
config.finalDebuggerSymDBUrl == "http://localhost:8126/symdb/v1/input"
}
}
Loading