Skip to content

Commit 89b8664

Browse files
committed
Add NodeClientVersion test
1 parent bd055af commit 89b8664

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

metrics/multinode_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ func TestMultiNodeMetrics_RecordNodeStates(t *testing.T) {
2828
)
2929
}
3030

31+
func TestMultiNodeMetrics_RecordNodeClientVersion(t *testing.T) {
32+
m := setupTestMultiNodeMetrics(t)
33+
ctx := context.Background()
34+
35+
m.RecordNodeClientVersion(ctx, "test-node-1", "rpc-1.2.3")
36+
37+
value := testutil.ToFloat64(promNodeClientVersion.WithLabelValues(
38+
"test-network",
39+
"1",
40+
"test-node-1",
41+
"rpc-1.2.3",
42+
))
43+
44+
require.Equal(t, float64(1), value)
45+
}
46+
3147
func TestMultiNodeMetrics_Verifies(t *testing.T) {
3248
m := setupTestMultiNodeMetrics(t)
3349
ctx := context.Background()

0 commit comments

Comments
 (0)