Skip to content

Commit

Permalink
expect error
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten committed Aug 15, 2024
1 parent 6810a21 commit 84d2272
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/telemetry/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ func TestNewTracerProvider(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
previousValue := globalgates.NoopTracerProvider.IsEnabled()
require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.NoopTracerProvider.ID(), tt.noopTracerGate))
// expect error due to deprecated flag
require.Error(t, featuregate.GlobalRegistry().Set(globalgates.NoopTracerProvider.ID(), tt.noopTracerGate))
defer func() {
require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.NoopTracerProvider.ID(), previousValue))
require.Error(t, featuregate.GlobalRegistry().Set(globalgates.NoopTracerProvider.ID(), previousValue))
}()
provider, err := newTracerProvider(context.TODO(), internal.Settings{}, tt.cfg)
require.NoError(t, err)
Expand Down

0 comments on commit 84d2272

Please sign in to comment.