Guess Datadog socket type when prefix is unix

This commit is contained in:
Kevin Pollet 2024-09-19 15:30:05 +02:00 committed by GitHub
parent 7e75dc0819
commit f3eba8d3a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 63 additions and 15 deletions

View file

@ -64,6 +64,18 @@ func TestDatadog_parseDatadogAddress(t *testing.T) {
expNetwork: "unix",
expAddress: "/path/to/datadog.socket",
},
{
desc: "unixgram address",
address: "unixgram:///path/to/datadog.socket",
expNetwork: "unixgram",
expAddress: "/path/to/datadog.socket",
},
{
desc: "unixstream address",
address: "unixstream:///path/to/datadog.socket",
expNetwork: "unixstream",
expAddress: "/path/to/datadog.socket",
},
}
for _, test := range tests {