mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Fix assertion for delete ingest pipelines api (#167451)
This commit is contained in:
parent
274fe1e9d0
commit
f5d223b253
2 changed files with 7 additions and 7 deletions
|
@ -32,16 +32,16 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
});
|
||||
|
||||
after(async () => {
|
||||
await ml.api.cleanMlIndices();
|
||||
await esDeleteAllIndices('user-index_dfa*');
|
||||
|
||||
// delete created ingest pipelines
|
||||
await Promise.all(
|
||||
['dfa_regression_model_alias', ...testModelIds].map((modelId) =>
|
||||
ml.api.deleteIngestPipeline(modelId)
|
||||
)
|
||||
);
|
||||
await ml.api.cleanMlIndices();
|
||||
await ml.testResources.cleanMLSavedObjects();
|
||||
|
||||
await esDeleteAllIndices('user-index_dfa*');
|
||||
});
|
||||
|
||||
it('returns all trained models with associated pipelines including aliases', async () => {
|
||||
|
|
|
@ -1504,10 +1504,10 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) {
|
|||
|
||||
async deleteIngestPipeline(modelId: string, usePrefix: boolean = true) {
|
||||
log.debug(`Deleting ingest pipeline for trained model with id "${modelId}"`);
|
||||
// const { body, status } =
|
||||
await esSupertest.delete(`/_ingest/pipeline/${usePrefix ? 'pipeline_' : ''}${modelId}`);
|
||||
// @todo
|
||||
// this.assertResponseStatusCode(200, status, body);
|
||||
const { body, status } = await esSupertest.delete(
|
||||
`/_ingest/pipeline/${usePrefix ? 'pipeline_' : ''}${modelId}`
|
||||
);
|
||||
this.assertResponseStatusCode(200, status, body);
|
||||
|
||||
log.debug('> Ingest pipeline deleted');
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue