コード例 #1
0
ファイル: check_json.py プロジェクト: confluentinc/ducktape
 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)
コード例 #2
0
ファイル: check_json.py プロジェクト: yekeqiang/ducktape
 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)