2020-08-18 10:27:50 +03:00
|
|
|
package noop
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2020-08-19 17:47:17 +03:00
|
|
|
"github.com/unistack-org/micro/v3/metrics"
|
2020-08-18 10:27:50 +03:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNoopReporter(t *testing.T) {
|
|
|
|
|
|
|
|
// Make a Reporter:
|
|
|
|
reporter := New(metrics.Path("/noop"))
|
|
|
|
assert.NotNil(t, reporter)
|
|
|
|
assert.Equal(t, "/noop", reporter.options.Path)
|
|
|
|
|
|
|
|
// Check that our implementation is valid:
|
|
|
|
assert.Implements(t, new(metrics.Reporter), reporter)
|
|
|
|
}
|