Skip to content

Commit

Permalink
remove unnecessary setting of env vars in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-wong committed Dec 19, 2024
1 parent 6fb5400 commit 9762bfd
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions contrib/internal/httptrace/httptrace_api_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 9762bfd

Please sign in to comment.