2019-06-18 03:10:05 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2017-03-14 12:13:41 -04:00
|
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
2020-07-06 15:16:26 -04:00
|
|
|
apply plugin: 'elasticsearch.rest-resources'
|
2017-03-14 12:13:41 -04:00
|
|
|
|
|
|
|
dependencies {
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(path: xpackModule('core'), configuration: 'default')
|
|
|
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
testImplementation project(path: xpackProject('plugin').path, configuration: 'testArtifacts')
|
2017-03-14 12:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// bring in machine learning rest test suite
|
2020-02-26 09:13:41 -05:00
|
|
|
restResources {
|
|
|
|
restApi {
|
2020-07-03 04:29:04 -04:00
|
|
|
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'search', 'get', 'count', 'ingest', 'bulk'
|
2020-02-26 09:13:41 -05:00
|
|
|
includeXpack 'ml', 'cat'
|
|
|
|
}
|
|
|
|
restTests {
|
|
|
|
includeXpack 'ml'
|
|
|
|
}
|
2017-03-14 12:13:41 -04:00
|
|
|
}
|
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
integTest.runner {
|
2017-03-14 12:13:41 -04:00
|
|
|
systemProperty 'tests.rest.blacklist', [
|
2018-01-11 10:40:13 -05:00
|
|
|
// Remove this test because it doesn't call an ML endpoint and we don't want
|
|
|
|
// to grant extra permissions to the users used in this test suite
|
|
|
|
'ml/ml_classic_analyze/Test analyze API with an analyzer that does what we used to do in native code',
|
2017-03-27 05:24:05 -04:00
|
|
|
// Remove tests that are expected to throw an exception, because we cannot then
|
|
|
|
// know whether to expect an authorization exception or a validation exception
|
2018-01-16 06:00:07 -05:00
|
|
|
'ml/calendar_crud/Test get calendar given missing',
|
2017-12-12 04:21:44 -05:00
|
|
|
'ml/calendar_crud/Test cannot create calendar with name _all',
|
|
|
|
'ml/calendar_crud/Test PageParams with ID is invalid',
|
2018-01-15 13:13:50 -05:00
|
|
|
'ml/calendar_crud/Test post calendar events given empty events',
|
2018-01-19 05:44:39 -05:00
|
|
|
'ml/calendar_crud/Test put calendar given id contains invalid chars',
|
2018-01-22 08:02:42 -05:00
|
|
|
'ml/calendar_crud/Test delete event from non existing calendar',
|
2018-01-22 08:49:38 -05:00
|
|
|
'ml/calendar_crud/Test delete job from non existing calendar',
|
2017-09-05 05:49:41 -04:00
|
|
|
'ml/custom_all_field/Test querying custom all field',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/datafeeds_crud/Test delete datafeed with missing id',
|
|
|
|
'ml/datafeeds_crud/Test put datafeed referring to missing job_id',
|
|
|
|
'ml/datafeeds_crud/Test put datafeed with invalid query',
|
2018-02-08 05:43:33 -05:00
|
|
|
'ml/datafeeds_crud/Test put datafeed with security headers in the body',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/datafeeds_crud/Test update datafeed with missing id',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config with security headers in the body',
|
2019-06-28 01:37:21 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config with create_time in the body',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with version in the body',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config with inconsistent body/param ids',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with invalid id',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with invalid dest index name',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with pattern dest index name',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with missing concrete source index',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with missing wildcard source index',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with dest index same as source index',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with dest index matching multiple indices',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with dest index included in source via alias',
|
2020-01-10 07:24:13 -05:00
|
|
|
'ml/data_frame_analytics_crud/Test put config with remote source index',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config with unknown top level field',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config with unknown field in outlier detection analysis',
|
2019-11-29 09:10:44 -05:00
|
|
|
'ml/data_frame_analytics_crud/Test put config given analyzed_fields include field excluded by source',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config given missing source',
|
2019-06-28 06:28:03 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config given source with empty index array',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config given source with empty string in index array',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config given source without index',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config given missing dest',
|
2020-01-10 07:24:13 -05:00
|
|
|
'ml/data_frame_analytics_crud/Test put config given dest index contains uppercase chars',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put config given dest with empty index',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config given dest without index',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config given missing analysis',
|
|
|
|
'ml/data_frame_analytics_crud/Test put config given empty analysis',
|
|
|
|
'ml/data_frame_analytics_crud/Test max model memory limit',
|
2019-10-07 11:21:33 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put outlier_detection given n_neighbors is negative',
|
|
|
|
'ml/data_frame_analytics_crud/Test put outlier_detection given n_neighbors is zero',
|
|
|
|
'ml/data_frame_analytics_crud/Test put outlier_detection given feature_influence_threshold is negative',
|
|
|
|
'ml/data_frame_analytics_crud/Test put outlier_detection given feature_influence_threshold is greater than one',
|
|
|
|
'ml/data_frame_analytics_crud/Test put outlier_detection given outlier_fraction is negative',
|
|
|
|
'ml/data_frame_analytics_crud/Test put outlier_detection given outlier_fraction is greater than one',
|
2019-08-09 12:31:13 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put regression given dependent_variable is not defined',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given negative lambda',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given negative gamma',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given eta less than 1e-3',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given eta greater than one',
|
2020-03-11 06:45:27 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put regression given max_trees is zero',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given max_trees is greater than 2k',
|
2019-08-09 12:31:13 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put regression given feature_bag_fraction is negative',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given feature_bag_fraction is greater than one',
|
2019-08-27 10:53:11 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put regression given training_percent is less than one',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given training_percent is greater than hundred',
|
2020-05-05 07:59:51 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put regression given loss_function_parameter is zero',
|
|
|
|
'ml/data_frame_analytics_crud/Test put regression given loss_function_parameter is negative',
|
2019-10-04 07:47:19 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put classification given dependent_variable is not defined',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given negative lambda',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given negative gamma',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given eta less than 1e-3',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given eta greater than one',
|
2020-03-11 06:45:27 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put classification given max_trees is zero',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given max_trees is greater than 2k',
|
2019-10-04 07:47:19 -04:00
|
|
|
'ml/data_frame_analytics_crud/Test put classification given feature_bag_fraction is negative',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given feature_bag_fraction is greater than one',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given num_top_classes is less than zero',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given num_top_classes is greater than 1k',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given training_percent is less than one',
|
|
|
|
'ml/data_frame_analytics_crud/Test put classification given training_percent is greater than hundred',
|
2020-03-31 12:59:38 -04:00
|
|
|
'ml/estimate_model_memory/Test missing overall cardinality',
|
|
|
|
'ml/estimate_model_memory/Test missing max bucket cardinality',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/evaluate_data_frame/Test given missing index',
|
|
|
|
'ml/evaluate_data_frame/Test given index does not exist',
|
|
|
|
'ml/evaluate_data_frame/Test given missing evaluation',
|
2020-07-21 09:15:04 -04:00
|
|
|
'ml/evaluate_data_frame/Test outlier_detection auc_roc given actual_field is always true',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection auc_roc given actual_field is always false',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given evaluation with empty metrics',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given missing actual_field',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given missing predicted_probability_field',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given precision with threshold less than zero',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given recall with threshold less than zero',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given confusion_matrix with threshold less than zero',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given precision with empty thresholds',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given recall with empty thresholds',
|
|
|
|
'ml/evaluate_data_frame/Test outlier_detection given confusion_matrix with empty thresholds',
|
2019-10-04 11:54:51 -04:00
|
|
|
'ml/evaluate_data_frame/Test classification given evaluation with empty metrics',
|
|
|
|
'ml/evaluate_data_frame/Test classification given missing actual_field',
|
|
|
|
'ml/evaluate_data_frame/Test classification given missing predicted_field',
|
2019-07-11 10:22:52 -04:00
|
|
|
'ml/evaluate_data_frame/Test regression given evaluation with empty metrics',
|
2019-08-20 18:37:04 -04:00
|
|
|
'ml/evaluate_data_frame/Test regression given missing actual_field',
|
|
|
|
'ml/evaluate_data_frame/Test regression given missing predicted_field',
|
2019-11-22 15:06:10 -05:00
|
|
|
'ml/explain_data_frame_analytics/Test neither job id nor body',
|
|
|
|
'ml/explain_data_frame_analytics/Test both job id and body',
|
|
|
|
'ml/explain_data_frame_analytics/Test missing job',
|
|
|
|
'ml/explain_data_frame_analytics/Test empty data frame given body',
|
2017-09-05 05:49:41 -04:00
|
|
|
'ml/delete_job_force/Test cannot force delete a non-existent job',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/delete_model_snapshot/Test delete snapshot missing snapshotId',
|
|
|
|
'ml/delete_model_snapshot/Test delete snapshot missing job_id',
|
|
|
|
'ml/delete_model_snapshot/Test delete with in-use model',
|
2017-05-18 13:09:20 -04:00
|
|
|
'ml/filter_crud/Test create filter api with mismatching body ID',
|
2018-07-02 07:48:04 -04:00
|
|
|
'ml/filter_crud/Test create filter given invalid filter_id',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/filter_crud/Test get filter API with bad ID',
|
|
|
|
'ml/filter_crud/Test non-existing filter',
|
2018-06-22 10:13:31 -04:00
|
|
|
'ml/filter_crud/Test update filter given remove item is not present',
|
2019-06-10 12:50:19 -04:00
|
|
|
'ml/filter_crud/Test get all filter given index exists but no mapping for filter_id',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/get_datafeed_stats/Test get datafeed stats given missing datafeed_id',
|
|
|
|
'ml/get_datafeeds/Test get datafeed given missing datafeed_id',
|
2019-11-18 13:19:17 -05:00
|
|
|
'ml/inference_crud/Test delete given used trained model',
|
|
|
|
'ml/inference_crud/Test delete with missing model',
|
|
|
|
'ml/inference_crud/Test get given missing trained model',
|
|
|
|
'ml/inference_crud/Test get given expression without matches and allow_no_match is false',
|
2020-01-24 09:29:12 -05:00
|
|
|
'ml/inference_crud/Test put ensemble with empty models',
|
2020-02-19 09:41:43 -05:00
|
|
|
'ml/inference_crud/Test put ensemble with tree where tree has out of bounds feature_names index',
|
2020-01-24 09:29:12 -05:00
|
|
|
'ml/inference_crud/Test put model with empty input.field_names',
|
2020-04-02 12:25:10 -04:00
|
|
|
'ml/inference_crud/Test PUT model where target type and inference config mismatch',
|
2020-03-13 15:40:57 -04:00
|
|
|
'ml/inference_processor/Test create processor with missing mandatory fields',
|
|
|
|
'ml/inference_processor/Test create and delete pipeline with inference processor',
|
|
|
|
'ml/inference_processor/Test create processor with deprecated fields',
|
2020-04-02 12:25:10 -04:00
|
|
|
'ml/inference_processor/Test simulate',
|
2019-11-18 13:19:17 -05:00
|
|
|
'ml/inference_stats_crud/Test get stats given missing trained model',
|
|
|
|
'ml/inference_stats_crud/Test get stats given expression without matches and allow_no_match is false',
|
2017-06-05 06:35:48 -04:00
|
|
|
'ml/jobs_crud/Test cannot create job with existing categorizer state document',
|
|
|
|
'ml/jobs_crud/Test cannot create job with existing quantiles document',
|
|
|
|
'ml/jobs_crud/Test cannot create job with existing result document',
|
2017-06-08 05:11:08 -04:00
|
|
|
'ml/jobs_crud/Test cannot create job with model snapshot id set',
|
2018-03-08 09:14:18 -05:00
|
|
|
'ml/jobs_crud/Test cannot decrease model_memory_limit below current usage',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/jobs_crud/Test get job API with non existing job id',
|
2017-08-07 03:53:12 -04:00
|
|
|
'ml/jobs_crud/Test put job after closing results index',
|
|
|
|
'ml/jobs_crud/Test put job after closing state index',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/jobs_crud/Test put job with inconsistent body/param ids',
|
2020-05-05 09:31:58 -04:00
|
|
|
'ml/jobs_crud/Test put job with inconsistent model snapshot settings',
|
2017-06-15 08:04:25 -04:00
|
|
|
'ml/jobs_crud/Test put job with time field in analysis_config',
|
2019-04-10 09:43:35 -04:00
|
|
|
'ml/jobs_crud/Test put job with duplicate detector configurations',
|
2018-01-11 10:40:13 -05:00
|
|
|
'ml/jobs_crud/Test job with categorization_analyzer and categorization_filters',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/jobs_get/Test get job given missing job_id',
|
|
|
|
'ml/jobs_get_result_buckets/Test mutually-exclusive params',
|
|
|
|
'ml/jobs_get_result_buckets/Test mutually-exclusive params via body',
|
|
|
|
'ml/jobs_get_result_categories/Test with invalid param combinations',
|
|
|
|
'ml/jobs_get_result_categories/Test with invalid param combinations via body',
|
2017-10-10 09:41:24 -04:00
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given missing job',
|
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given non-matching expression and not allow_no_jobs',
|
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given top_n is 0',
|
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given top_n is negative',
|
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given invalid start param',
|
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given invalid end param',
|
2017-10-27 06:14:13 -04:00
|
|
|
'ml/jobs_get_result_overall_buckets/Test overall buckets given bucket_span is smaller than max job bucket_span',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/jobs_get_stats/Test get job stats given missing job',
|
2017-06-08 05:11:08 -04:00
|
|
|
'ml/jobs_get_stats/Test no exception on get job stats with missing index',
|
2017-09-05 05:49:41 -04:00
|
|
|
'ml/job_groups/Test put job with empty group',
|
|
|
|
'ml/job_groups/Test put job with group that matches an job id',
|
|
|
|
'ml/job_groups/Test put job with group that matches its id',
|
|
|
|
'ml/job_groups/Test put job with id that matches an existing group',
|
|
|
|
'ml/job_groups/Test put job with invalid group',
|
2018-03-21 06:23:20 -04:00
|
|
|
'ml/ml_info/Test ml info',
|
2020-07-14 15:53:40 -04:00
|
|
|
'ml/pipeline_inference/Test setting results field is invalid',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/post_data/Test Flush data with invalid parameters',
|
2017-05-08 11:34:46 -04:00
|
|
|
'ml/post_data/Test flushing and posting a closed job',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/post_data/Test open and close with non-existent job id',
|
|
|
|
'ml/post_data/Test POST data with invalid parameters',
|
|
|
|
'ml/preview_datafeed/Test preview missing datafeed',
|
|
|
|
'ml/revert_model_snapshot/Test revert model with invalid snapshotId',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/start_data_frame_analytics/Test start given missing source index',
|
2020-04-29 04:39:58 -04:00
|
|
|
'ml/start_data_frame_analytics/Test start outlier_detection given source index has no fields',
|
|
|
|
'ml/start_data_frame_analytics/Test start regression given source index only has dependent variable',
|
2019-06-25 13:29:11 -04:00
|
|
|
'ml/start_data_frame_analytics/Test start with inconsistent body/param ids',
|
2019-08-01 17:19:48 -04:00
|
|
|
'ml/start_data_frame_analytics/Test start given dest index is not empty',
|
2019-08-26 15:18:17 -04:00
|
|
|
'ml/start_data_frame_analytics/Test start with compatible fields but no data',
|
2017-03-14 12:13:41 -04:00
|
|
|
'ml/start_stop_datafeed/Test start datafeed job, but not open',
|
|
|
|
'ml/start_stop_datafeed/Test start non existing datafeed',
|
|
|
|
'ml/start_stop_datafeed/Test stop non existing datafeed',
|
|
|
|
'ml/update_model_snapshot/Test without description',
|
|
|
|
'ml/validate/Test invalid job config',
|
2017-06-07 04:34:58 -04:00
|
|
|
'ml/validate/Test job config is invalid because model snapshot id set',
|
2017-06-08 05:11:08 -04:00
|
|
|
'ml/validate/Test job config that is invalid only because of the job ID',
|
2019-04-10 09:43:35 -04:00
|
|
|
'ml/validate/Test job config with duplicate detector configurations',
|
2018-09-03 20:06:18 -04:00
|
|
|
'ml/validate_detector/Test invalid detector',
|
|
|
|
'ml/delete_forecast/Test delete on _all forecasts not allow no forecasts',
|
2019-01-28 10:07:30 -05:00
|
|
|
'ml/delete_forecast/Test delete forecast on missing forecast',
|
|
|
|
'ml/set_upgrade_mode/Attempt to open job when upgrade_mode is enabled',
|
|
|
|
'ml/set_upgrade_mode/Setting upgrade_mode to enabled',
|
|
|
|
'ml/set_upgrade_mode/Setting upgrade mode to disabled from enabled',
|
|
|
|
'ml/set_upgrade_mode/Test setting upgrade_mode to false when it is already false'
|
2017-03-14 12:13:41 -04:00
|
|
|
].join(',')
|
|
|
|
}
|
|
|
|
|
2019-06-18 03:10:05 -04:00
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
testClusters.integTest {
|
2019-07-15 20:53:05 -04:00
|
|
|
testDistribution = 'DEFAULT'
|
2019-06-18 03:10:05 -04:00
|
|
|
extraConfigFile 'roles.yml', file('roles.yml')
|
|
|
|
user username: "x_pack_rest_user", password: "x-pack-test-password"
|
|
|
|
user username: "ml_admin", password: "x-pack-test-password", role: "minimal,machine_learning_admin"
|
|
|
|
user username: "ml_user", password: "x-pack-test-password", role: "minimal,machine_learning_user"
|
|
|
|
user username: "no_ml", password: "x-pack-test-password", role: "minimal"
|
2018-02-12 14:57:04 -05:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2018-03-21 23:09:44 -04:00
|
|
|
setting 'xpack.security.enabled', 'true'
|
2017-03-14 12:13:41 -04:00
|
|
|
}
|