This commit is contained in:
parent
9bbe536f39
commit
ec78765e4f
1 changed files with 6 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue