Files
query-orchestration/internal/server/otel/service_test.go
T
Michael McGuinness 7001ca854c Merged in feature/docinitialisation (pull request #41)
Queuing Changes and Cfg Testing

* staarting

* staarting

* startedpush

* note

* save

* mocking

* removederrs

* fixtests

* cleanuperrs

* newenvsetup

* preppingtests

* queue

* mmovetocfgpassunittests

* sortoutconfig

* passinginteg

* deps

* fixtests
2025-02-03 17:30:50 +00:00

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)
}
}()
}