mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-04 11:02:06 +00:00
* Rebased and git-squashed the commits in PR #6546 migrate abci to finalizeBlock work on abci, proxy and mempool abciresponse, blok events, indexer, some tests fix some tests fix errors fix errors in abci fix tests amd errors * Fixes after rebasing PR#6546 * Restored height to RequestFinalizeBlock & other * Fixed more UTs * Fixed kvstore * More UT fixes * last TC fixed * make format * Update internal/consensus/mempool_test.go Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com> * Addressed @williambanfield's comments * Fixed UTs * Addressed last comments from @williambanfield * make format Co-authored-by: marbar3778 <marbar3778@yahoo.com> Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
21 lines
438 B
Go
21 lines
438 B
Go
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)
|
|
}
|