mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
19 lines
404 B
Go
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")
|
|
}
|