Files
github--github-mcp-server/pkg/observability/observability_test.go
Adam Holt 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
Add logging stack interfaces and adapters
2026-01-07 13:02:24 +01:00

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