Repository navigation
Conversation
from outside the cluster - Catch exception when key error and inform user - Check for nodes only when wan_only is False
|
Could you please write a test that that checks that a node with the id is added but the "publish_address" value is None when wan_only is True? |
| """ | ||
|
|
||
| :param elasticsearch.Elasticsearch elk_client: Instance of an | ||
| Elasticsearch client to connect to |
There was a problem hiding this comment.
can you add wan_only doc string here as well?
There was a problem hiding this comment.
Done, I hope it correct like what you want
| def get_nodes_from_elastic(self, elk_client): | ||
| def get_nodes_from_elastic(self, elk_client, wan_only): | ||
| """ | ||
| if wan_only value is True, then set None on publish_address |
There was a problem hiding this comment.
Please add it as parameter in the doc string bellow like elk_client e.g
:param bool wan_only: Whether DaskElkClient is connected in wan_only mode or notThis doc strings is necessary for the documentation to be correctly created.
You can add it under the elk_client param entry in the doc string
| self.assertEqual("E43TT5r9Q9-VWckuAXLf0Q", node.node_id) | ||
| self.assertEqual("1.1.1.1:9200", node.publish_address) | ||
| self.assertEqual(("master", "data", "ingest"), node.node_type) | ||
|
|
There was a problem hiding this comment.
Can you add a test here? You can use the test above and below for examples. You should call get_nodes_from_elastic with wan_only=True. You should expecgt the node's publish address to be None so you could check something like
self.assertIsNone(node.publish_address)All the other assertions should probably be the same.
| return self.__nodes | ||
|
|
||
| def get_nodes_from_elastic(self, elk_client): | ||
| def get_nodes_from_elastic(self, elk_client, wan_only): |
There was a problem hiding this comment.
I would prefer if you set this with default value to False So it won't break any call to get_nodes_from_elastic without passing wan_only parameter.
No description provided.