From b3e2ec1ccaca3832a088ffcac54257fa6653c6c1 Mon Sep 17 00:00:00 2001 From: Vijay Srinivas Date: Thu, 29 Jun 2023 17:13:26 +0530 Subject: [PATCH] update test cases TestUINodes, TestUINodeInfo --- agent/ui_endpoint_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/ui_endpoint_test.go b/agent/ui_endpoint_test.go index 494e395168..b9b0144c96 100644 --- a/agent/ui_endpoint_test.go +++ b/agent/ui_endpoint_test.go @@ -162,6 +162,9 @@ func TestUINodes(t *testing.T) { require.Len(t, nodes[2].Services, 0) require.NotNil(t, nodes[1].Checks) require.Len(t, nodes[2].Services, 0) + + // check for consul-version in node meta + require.Equal(t, nodes[0].Meta[structs.MetaConsulVersion], a.Config.Version) } func TestUINodes_Filter(t *testing.T) { @@ -260,6 +263,9 @@ func TestUINodeInfo(t *testing.T) { node.Checks == nil || len(node.Checks) != 0 { t.Fatalf("bad: %v", node) } + + // check for consul-version in node meta + require.Equal(t, node.Meta[structs.MetaConsulVersion], a.Config.Version) } func TestUIServices(t *testing.T) {