Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
  • Loading branch information
onelapahead committed Dec 5, 2024
1 parent 88fdd54 commit 9cd0b48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/metric/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ func TestMetricsRegistry(t *testing.T) {
assert.NotNil(t, httpHandler)
}

func TestMetricsRegistryWithOptions(t *testing.T) {
mr := NewPrometheusMetricsRegistryWithOptions("test", Options{
MetricsPrefix: "foobar",
})

reg := mr.(*prometheusMetricsRegistry)

assert.Equal(t, "foobar", reg.namespace)
}

func TestMetricsManager(t *testing.T) {
mr := NewPrometheusMetricsRegistry("test")
ctx, cancel := context.WithCancel(context.Background())
Expand Down

0 comments on commit 9cd0b48

Please sign in to comment.