[ML] fix ml inference stats tests (#58690) (#58729)

This commit is contained in:
Benjamin Trent 2020-06-30 07:53:33 -04:00 committed by GitHub
parent 3923a10165
commit def5550df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 0 deletions

View File

@ -96,6 +96,40 @@ setup:
}
]
}
# automatically create concrete index so shards get allocated
- do:
headers:
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
index:
index: .ml-stats-000001
body: >
{
}
# reference and then de-reference a model to flush the stats
- do:
headers:
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
ingest.put_pipeline:
id: "regression-model-pipeline-2"
body: >
{
"processors": [
{
"inference" : {
"model_id" : "a-unused-regression-model",
"inference_config": {"regression": {}},
"target_field": "regression_field",
"field_map": {}
}
}
]
}
- do:
headers:
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
ingest.delete_pipeline:
id: "regression-model-pipeline-2"
- do:
headers:
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser