micro-meter-prometheus/options_test.go
Vasiliy Tolstov bea52c961f use own fork
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-19 16:51:58 +03:00

21 lines
543 B
Go

// +build ignore
package prometheus
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/unistack-org/micro/v3/meter"
)
func TestOptions(t *testing.T) {
// Make some new options:
options := meter.NewOptions(meter.Path("/prometheus"), meter.DefaultTags(map[string]string{"service": "prometheus-test"}))
// Check that the defaults and overrides were accepted:
assert.Equal(t, ":9000", options.Address)
assert.Equal(t, "/prometheus", options.Path)
assert.Equal(t, "prometheus-test", options.DefaultTags["service"])
}