update test cases TestUINodes, TestUINodeInfo

pull/17754/head
Vijay Srinivas 2023-06-29 17:13:26 +05:30 committed by Vijay
parent 931fdfc7ec
commit b3e2ec1cca
1 changed files with 6 additions and 0 deletions

View File

@ -162,6 +162,9 @@ func TestUINodes(t *testing.T) {
require.Len(t, nodes[2].Services, 0) require.Len(t, nodes[2].Services, 0)
require.NotNil(t, nodes[1].Checks) require.NotNil(t, nodes[1].Checks)
require.Len(t, nodes[2].Services, 0) 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) { func TestUINodes_Filter(t *testing.T) {
@ -260,6 +263,9 @@ func TestUINodeInfo(t *testing.T) {
node.Checks == nil || len(node.Checks) != 0 { node.Checks == nil || len(node.Checks) != 0 {
t.Fatalf("bad: %v", node) 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) { func TestUIServices(t *testing.T) {