error-pages/internal/metrics/registry_test.go

20 lines
398 B
Go
Raw Normal View History

2022-01-28 15:42:08 +00:00
package metrics_test
import (
"testing"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"gh.tarampamp.am/error-pages/internal/metrics"
2022-01-28 15:42:08 +00:00
)
func TestNewRegistry(t *testing.T) {
registry := metrics.NewRegistry()
count, err := testutil.GatherAndCount(registry)
assert.NoError(t, err)
assert.True(t, count >= 6, "not enough common metrics")
}