From 9762bfd21b0d33669ca6b5de3d05fa7adc1aba63 Mon Sep 17 00:00:00 2001 From: Jordan Wong Date: Thu, 19 Dec 2024 13:11:05 -0500 Subject: [PATCH] remove unnecessary setting of env vars in tests --- contrib/internal/httptrace/httptrace_api_gateway_test.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/contrib/internal/httptrace/httptrace_api_gateway_test.go b/contrib/internal/httptrace/httptrace_api_gateway_test.go index 38a6e3eb97..4c4617ac9a 100644 --- a/contrib/internal/httptrace/httptrace_api_gateway_test.go +++ b/contrib/internal/httptrace/httptrace_api_gateway_test.go @@ -56,7 +56,6 @@ func cleanupTest() { func TestInferredProxySpans(t *testing.T) { t.Run("should create parent and child spans for a 200", func(t *testing.T) { - t.Setenv(inferredProxyServicesEnabled, "true") mt := mocktracer.Start() defer mt.Stop() loadTest(t) @@ -68,8 +67,6 @@ func TestInferredProxySpans(t *testing.T) { assert := assert.New(t) assert.NoError(err) - // in go, 2 possible ways to create a testing env, Assert.New(t) or - for k, v := range inferredHeaders { req.Header.Set(k, v) } @@ -103,7 +100,6 @@ func TestInferredProxySpans(t *testing.T) { }) t.Run("should create parent and child spans for error", func(t *testing.T) { - t.Setenv("DD_INFERRED_PROXY_SERVICES_ENABLED", "true") mt := mocktracer.Start() defer mt.Stop() loadTest(t) @@ -144,7 +140,6 @@ func TestInferredProxySpans(t *testing.T) { }) t.Run("should not create API Gateway spanif headers are missing", func(t *testing.T) { - t.Setenv("DD_INFERRED_PROXY_SERVICES_ENABLED", "true") mt := mocktracer.Start() defer mt.Stop() loadTest(t) @@ -167,7 +162,6 @@ func TestInferredProxySpans(t *testing.T) { }) t.Run("should not create API Gateway span if x-dd-proxy is missing", func(t *testing.T) { - t.Setenv("DD_INFERRED_PROXY_SERVICES_ENABLED", "true") mt := mocktracer.Start() defer mt.Stop() loadTest(t)