def check_node_names(self): cluster = JsonCluster( {"nodes": [ {"ssh_config": {"host": "localhost1"}}, {"ssh_config": {"host": "localhost2"}}, {"ssh_config": {"host": "localhost3"}}]}) hosts = set(["localhost1", "localhost2", "localhost3"]) nodes = cluster.alloc(cluster.available()) assert hosts == set(node.name for node in nodes)
def check_node_names(self): cluster = JsonCluster({ "nodes": [{ "ssh_config": { "host": "localhost1" } }, { "ssh_config": { "host": "localhost2" } }, { "ssh_config": { "host": "localhost3" } }] }) hosts = set(["localhost1", "localhost2", "localhost3"]) nodes = cluster.alloc(cluster.available()) assert hosts == set(node.name for node in nodes)