NAME
App::Prove::Elasticsearch::Planner::Default - Index, create and retrieve test plans for use later
VERSION
version 0.001
SUBCLASSING
The most useful reason to subclass the planner is to tell the system where to find named tests stored in a plan. For a variety of good reasons, we do not store paths to tests in plans. You are expected to alter find_test_paths() to suit your needs if the default behavior (search t/) is insufficient.
VARIABLES
index (STRING)
The name of the elasticsearch index used. If you are subclassing this, be aware that the Searcher plugin will rely on this.
max_query_size
Number of items returned by queries. Defaults to 1000.
CONSTRUCTOR
check_index($conf)
Constructs a new Search::Elasticsearch object using the provided configuration file data, and stores it for use by other functions. It then checks the index, and returns false or the object depending on the index status.
Creates the index if it does not exist.
METHODS
All methods below die if the ES handle hasn't been defined by check_index.
find_test_paths(@tests)
Resolves the paths to your tests. By default this is the t/ directory under your current directory. See SUBCLASSING for more information.
Returns ARRAY
get_plan
Get the plan most closely matching the description from Elasticsearch.
get_plans(%options)
Get all the plans matching the version/platforms passed.
Input hash specification:
- version - Required. Version of the software to be tested.
- name - Optional. Name of the test plan used (if any).
- platforms - Optional. ARRAYREF of platform names to be tested upon. Must match all provided platforms.
get_plans_needing_work(%options)
Ask which of the plans in ES fits the provided specification.
Input hash specification:
- searcher - Required. App::Prove::Elasticsearch::Searcher::* object.
- All other items should be the same as in get_plans.
get_plan_status(plan)
Gets the status of the tests to be run in the provided plan, regardless of if the plan even exists.
add_plan_to_index($plan)
Add or update a test plan. Dies if the plan cannot be added/updated. Returns 1 in the event of failure.
make_plan(%plan)
Build a test plan ready to be indexed, and return it.
Takes a hash describing the plan to be created and then mangles it to fit in openstack.
make_plan_update($existing_plan,%plan)
Build an update statement to modify an indexed plan. The existing plan and a hash describing the modifications to the plan are required.
AUTHOR
George S. Baugh <teodesian@cpan.org>
SOURCE
The development version is on github at http://https://github.com/teodesian/App-Prove-Elasticsearch and may be cloned from git://https://github.com/teodesian/App-Prove-Elasticsearch.git
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by George S. Baugh.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.