Skip to content

Commit

Permalink
partial backport: ddtrace/tracer: removed appsec.enabled assertion in…
Browse files Browse the repository at this point in the history
… RC test (#2562) (#2567)

Co-authored-by: Diana Shevchenko <40775148+dianashevchenko@users.noreply.github.com>
  • Loading branch information
felixge and dianashevchenko committed Feb 20, 2024
1 parent fadf52c commit 5607861
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ddtrace/tracer/remote_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package tracer

import (
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/internal"
"gopkg.in/DataDog/dd-trace-go.v1/internal/appsec"
"testing"

"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
Expand Down Expand Up @@ -126,14 +125,10 @@ func TestOnRemoteConfigUpdate(t *testing.T) {
t.Run("RC tracing_enabled = false is applied", func(t *testing.T) {
telemetryClient := new(telemetrytest.MockClient)
defer telemetry.MockGlobalClient(telemetryClient)()
t.Setenv("DD_APPSEC_ENABLED", "true")

Start(WithService("my-service"), WithEnv("my-env"))
defer Stop()

appsec.Start()
defer appsec.Stop()

input := remoteconfig.ProductUpdate{
"path": []byte(`{"lib_config": {"tracing_enabled": false}, "service_target": {"service": "my-service", "env": "my-env"}}`),
}
Expand All @@ -143,7 +138,6 @@ func TestOnRemoteConfigUpdate(t *testing.T) {
applyStatus := tr.onRemoteConfigUpdate(input)
require.Equal(t, state.ApplyStateAcknowledged, applyStatus["path"].State)
require.Equal(t, false, tr.config.enabled.current)
require.Equal(t, true, appsec.Enabled())
headers := TextMapCarrier{
traceparentHeader: "00-12345678901234567890123456789012-1234567890123456-01",
tracestateHeader: "dd=s:2;o:rum;t.usr.id:baz64~~",
Expand Down

0 comments on commit 5607861

Please sign in to comment.