error-pages/internal/metrics/registry_test.go
2022-01-28 20:42:08 +05:00

19 lines
404 B
Go

package metrics_test
import (
"testing"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/tarampampam/error-pages/internal/metrics"
)
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")
}