mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -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 () => {
|
after(async () => {
|
||||||
|
await ml.api.cleanMlIndices();
|
||||||
|
await esDeleteAllIndices('user-index_dfa*');
|
||||||
|
|
||||||
// delete created ingest pipelines
|
// delete created ingest pipelines
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
['dfa_regression_model_alias', ...testModelIds].map((modelId) =>
|
['dfa_regression_model_alias', ...testModelIds].map((modelId) =>
|
||||||
ml.api.deleteIngestPipeline(modelId)
|
ml.api.deleteIngestPipeline(modelId)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
await ml.api.cleanMlIndices();
|
|
||||||
await ml.testResources.cleanMLSavedObjects();
|
await ml.testResources.cleanMLSavedObjects();
|
||||||
|
|
||||||
await esDeleteAllIndices('user-index_dfa*');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns all trained models with associated pipelines including aliases', async () => {
|
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) {
|
async deleteIngestPipeline(modelId: string, usePrefix: boolean = true) {
|
||||||
log.debug(`Deleting ingest pipeline for trained model with id "${modelId}"`);
|
log.debug(`Deleting ingest pipeline for trained model with id "${modelId}"`);
|
||||||
// const { body, status } =
|
const { body, status } = await esSupertest.delete(
|
||||||
await esSupertest.delete(`/_ingest/pipeline/${usePrefix ? 'pipeline_' : ''}${modelId}`);
|
`/_ingest/pipeline/${usePrefix ? 'pipeline_' : ''}${modelId}`
|
||||||
// @todo
|
);
|
||||||
// this.assertResponseStatusCode(200, status, body);
|
this.assertResponseStatusCode(200, status, body);
|
||||||
|
|
||||||
log.debug('> Ingest pipeline deleted');
|
log.debug('> Ingest pipeline deleted');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue