

def test_close_opened(self):
    self.write_config(self.args['configfile'], testvars.client_config.format(host, port))
    self.write_config(self.args['actionfile'], testvars.optionless_proto.format('close'))
    self.create_index('my_index')
    self.create_index('dummy')
    test = clicktest.CliRunner()
    result = test.invoke(curator.cli, ['--config', self.args['configfile'], self.args['actionfile']])
    self.assertEquals('close', self.client.cluster.state(index='my_index', metric='metadata')['metadata']['indices']['my_index']['state'])
    self.assertNotEqual('close', self.client.cluster.state(index='dummy', metric='metadata')['metadata']['indices']['dummy']['state'])

dataset/ETHPy150Open elastic/curator/test/integration/test_close.py TestCLIClose.test_close_opened/original