ac128e2f40
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
27 lines
515 B
Go
27 lines
515 B
Go
package observability
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/github/github-mcp-server/pkg/observability/log"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewExporters(t *testing.T) {
|
|
logger := log.NewNoopLogger()
|
|
exp := NewExporters(logger)
|
|
ctx := context.Background()
|
|
|
|
assert.NotNil(t, exp)
|
|
assert.Equal(t, logger, exp.Logger(ctx))
|
|
}
|
|
|
|
func TestExporters_WithNilLogger(t *testing.T) {
|
|
exp := NewExporters(nil)
|
|
ctx := context.Background()
|
|
|
|
assert.NotNil(t, exp)
|
|
assert.Nil(t, exp.Logger(ctx))
|
|
}
|