7001ca854c
Queuing Changes and Cfg Testing * staarting * staarting * startedpush * note * save * mocking * removederrs * fixtests * cleanuperrs * newenvsetup * preppingtests * queue * mmovetocfgpassunittests * sortoutconfig * passinginteg * deps * fixtests
28 lines
543 B
Go
28 lines
543 B
Go
package otel_test
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"queryorchestration/internal/server/otel"
|
|
"queryorchestration/internal/serviceconfig/observability"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNew(t *testing.T) {
|
|
ctx := context.Background()
|
|
|
|
cfg := &observability.ObsConfig{
|
|
EnableOtel: true,
|
|
}
|
|
clean := otel.New(ctx, cfg)
|
|
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)
|
|
}
|
|
}()
|
|
}
|