diff --git a/nodes/main_test.go b/nodes/main_test.go index 4c1a907..31b1d2c 100644 --- a/nodes/main_test.go +++ b/nodes/main_test.go @@ -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) {