

def test_connector_add_two_connectors(self):
    self.setup_cluster(NoHadoopBareImageProvider(), self.STANDALONE_PRESTO_CLUSTER)
    self.run_prestoadmin('connector remove tpch')
    self.cluster.write_content_to_host('connector.name=tpch', os.path.join(constants.CONNECTORS_DIR, 'tpch.properties'), self.cluster.master)
    self.cluster.write_content_to_host('connector.name=jmx', os.path.join(constants.CONNECTORS_DIR, 'jmx.properties'), self.cluster.master)
    self.run_prestoadmin('connector add')
    self.run_prestoadmin('server start')
    for host in self.cluster.all_hosts():
        filepath = '/etc/presto/catalog/jmx.properties'
        self.assert_has_default_connector(host)
        self.assert_file_perm_owner(host, filepath, '-rw-------', 'presto', 'presto')
        self.assert_file_content(host, filepath, 'connector.name=jmx')
    self._assert_connectors_loaded([['system'], ['jmx'], ['tpch']])

dataset/ETHPy150Open prestodb/presto-admin/tests/product/test_connectors.py TestConnectors.test_connector_add_two_connectors/original