many fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-02-13 15:34:48 +03:00
parent c4170d01d9
commit 3573133bdb
35 changed files with 246 additions and 1671 deletions

View File

@@ -2,19 +2,16 @@ package meter
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestNoopMeter(t *testing.T) {
meter := NewMeter(Path("/noop"))
assert.NotNil(t, meter)
assert.Equal(t, "/noop", meter.Options().Path)
assert.Implements(t, new(Meter), meter)
if "/noop" != meter.Options().Path {
t.Fatalf("invalid options parsing: %v", meter.Options())
}
cnt := meter.Counter("counter", Label("server", "noop"))
cnt.Inc()
}
func TestLabels(t *testing.T) {