Skip to content

Commit

Permalink
chore: add tests for tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed Jun 22, 2024
1 parent ae90411 commit d7ae679
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pkg/config/tracing_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package config

import (
"github.com/guregu/null/v5"

Check failure on line 4 in pkg/config/tracing_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
"testing"

"github.com/stretchr/testify/assert"
)

func TestTracingInvalid(t *testing.T) {
t.Parallel()

tracing := TracingConfig{Enabled: null.BoolFrom(true)}
err := tracing.Validate()
assert.Error(t, err)
}

func TestTracingValid(t *testing.T) {
t.Parallel()

tracing := TracingConfig{Enabled: null.BoolFrom(true), OpenTelemetryHTTPHost: "test"}
err := tracing.Validate()
assert.NoError(t, err)
}

0 comments on commit d7ae679

Please sign in to comment.