You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
438 B

package p2p
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/tendermint/tendermint/proto/tendermint/p2p"
)
func TestValueToMetricsLabel(t *testing.T) {
m := NopMetrics()
r := &p2p.PexResponse{}
str := m.ValueToMetricLabel(r)
assert.Equal(t, "p2p_PexResponse", str)
// subsequent calls to the function should produce the same result
str = m.ValueToMetricLabel(r)
assert.Equal(t, "p2p_PexResponse", str)
}