Skip to content

Commit

Permalink
Add check for globalconfig inheriting auto-detected uds address
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 committed May 9, 2024
1 parent 9579a84 commit 847f047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ddtrace/tracer/option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ func TestAutoDetectStatsd(t *testing.T) {
require.NoError(t, err)
defer statsd.Close()
require.Equal(t, cfg.dogstatsdAddr, "unix://"+addr)
// Ensure globalconfig also gets the auto-detected UDS address
require.Equal(t, "unix://"+addr, globalconfig.DogstatsdAddr())
statsd.Count("name", 1, []string{"tag"}, 1)

buf := make([]byte, 17)
Expand Down Expand Up @@ -500,7 +502,7 @@ func TestTracerOptionsDefaults(t *testing.T) {
if err != nil {
t.Fatal("Failed to create socket")
}
udsPath := filepath.Join(dir, "apm.socket")
udsPath := filepath.Join(dir, "dsd.socket")
defer os.RemoveAll(udsPath)
unixListener, err := net.Listen("unix", udsPath)
if err != nil {
Expand Down

0 comments on commit 847f047

Please sign in to comment.