Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: FlamingSaint <[email protected]>
  • Loading branch information
FlamingSaint committed Jul 22, 2024
1 parent 81bc142 commit 2e36abe
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plugin/metrics/prometheus/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/pkg/config"
promCfg "github.com/jaegertracing/jaeger/pkg/prometheus/config"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/storage"
)
Expand Down Expand Up @@ -134,6 +135,20 @@ func TestFailedTLSOptions(t *testing.T) {
t.Errorf("f.InitFromViper did not panic")
}

func TestEmptyFactoryConfig(t *testing.T) {
cfg := promCfg.Configuration{}
_, err := NewFactoryWithConfig(cfg, zap.NewNop())
require.Error(t, err)
}

func TestFactoryConfig(t *testing.T) {
cfg := promCfg.Configuration{
ServerURL: "localhost:1234",
}
_, err := NewFactoryWithConfig(cfg, zap.NewNop())
require.NoError(t, err)
}

func TestMain(m *testing.M) {
testutils.VerifyGoLeaks(m)
}

0 comments on commit 2e36abe

Please sign in to comment.