package observability_test import ( "fmt" "testing" "queryorchestration/internal/serviceconfig/observability" "github.com/stretchr/testify/assert" ) func TestIsOtelEnabled(t *testing.T) { c := observability.ObsConfig{} assert.False(t, c.IsOtelEnabled()) c.EnableOtel = true assert.True(t, c.IsOtelEnabled()) } func TestSetOtel(t *testing.T) { ctx := t.Context() cfg := &observability.ObsConfig{ EnableOtel: true, } clean := cfg.SetOtel(ctx) assert.NotNil(t, clean) defer func() { if err := clean(); err != nil { // Log cleanup error but don't panic since we're shutting down fmt.Printf("Error during clean: %v", err) } }() }