def METHOD_NAME(self):
    """Test restore action with renaming enabled"""
    indices = []
    for i in range(1,4):
        self.add_docs(f'my_index{i}')
        indices.append(f'my_index{i}')
    snap_name = 'snapshot1'
    self.create_snapshot(snap_name, ','.join(indices))
    snapshot = get_snapshot(self.client, self.args['repository'], '*')
    time.sleep(1)
    self.assertEqual(1, len(snapshot['snapshots']))
    assert 1 == len(snapshot['snapshots'])
    self.client.indices.delete(index=','.join(indices))
    self.assertEqual([], get_indices(self.client))
    assert not get_indices(self.client)
    self.write_config(self.args['configfile'], testvars.client_config.format(HOST))
    self.write_config(self.args['actionfile'],
        testvars.restore_snapshot_proto.format(
            self.args['repository'],
            snap_name,
            indices,
            False,
            False,
            True,
            False,
            'my_index(.+)',
            'new_index$1',
            ' ',
            True,
            False,
            301,
            1,
            3,
        )
    )
    self.invoke_runner()
    time.sleep(1)
    restored_indices = sorted(get_indices(self.client))
    self.assertEqual(
        ['new_index1', 'new_index2', 'new_index3'],
        restored_indices
    )
    assert ['new_index1', 'new_index2', 'new_index3'] == restored_indices
    # The test runs so fast that it tries to execute the cleanup step
    # and delete the repository before Elasticsearch is actually ready
    time.sleep(1)