Fix tests
All checks were successful
Tests / test (push) Successful in 11s

This commit is contained in:
Adam Štrauch 2024-12-08 18:08:34 +01:00
parent 9bbe536f39
commit ec78765e4f
Signed by: cx
GPG key ID: 7262DAFE292BCE20

View file

@ -32,11 +32,12 @@ func TestNodesProcessor_Refresh(t *testing.T) {
np.Refresh("test", Labels{"mylabel"}, KV{"mykey": "my value"})
np.Refresh("test2", Labels{"mylabel3"}, KV{"mykey3": "my value3"})
nodes := np.List()
assert.Equal(t, "test", nodes[0].HostName)
assert.Contains(t, nodes[0].Labels, "mylabel")
assert.Equal(t, "test2", nodes[1].HostName)
assert.Contains(t, nodes[1].Labels, "mylabel3")
nodeTest, _ := np.Get("test")
nodeTest2, _ := np.Get("test2")
assert.Equal(t, "test", nodeTest.HostName)
assert.Contains(t, nodeTest.Labels, "mylabel")
assert.Equal(t, "test2", nodeTest2.HostName)
assert.Contains(t, nodeTest2.Labels, "mylabel3")
}
func TestNodesProcessor_DumpLoad(t *testing.T) {