Skip to content

Commit 98457f7

Browse files
[8.18] [Ingest Pipeline] Remove test pipeline only if exist (elastic#232487) (elastic#233488)
# Backport This will backport the following commits from `main` to `8.18`: - [[Ingest Pipeline] Remove test pipeline only if exist (elastic#232487)](elastic#232487) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sonia Sanz Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-08-29T13:21:58Z","message":"[Ingest Pipeline] Remove test pipeline only if exist (elastic#232487)\n\nCloses https://github.com/elastic/kibana/issues/232442\n\n## Summary\n\nThis test only failed once, but it was because we have an after method\ntried to delete a pipeline that didn't exist. Wrapping it into a\ntry/catch will prevent this to fail in the future.","sha":"459224a1a5cb506d0e685691c233ddbcac84e8bb","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana Management","release_note:skip","Feature:Ingest Node Pipelines","backport:all-open","v9.2.0"],"title":"[Ingest Pipeline] Remove test pipeline only if exist","number":232487,"url":"https://github.com/elastic/kibana/pull/232487","mergeCommit":{"message":"[Ingest Pipeline] Remove test pipeline only if exist (elastic#232487)\n\nCloses https://github.com/elastic/kibana/issues/232442\n\n## Summary\n\nThis test only failed once, but it was because we have an after method\ntried to delete a pipeline that didn't exist. Wrapping it into a\ntry/catch will prevent this to fail in the future.","sha":"459224a1a5cb506d0e685691c233ddbcac84e8bb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/232487","number":232487,"mergeCommit":{"message":"[Ingest Pipeline] Remove test pipeline only if exist (elastic#232487)\n\nCloses https://github.com/elastic/kibana/issues/232442\n\n## Summary\n\nThis test only failed once, but it was because we have an after method\ntried to delete a pipeline that didn't exist. Wrapping it into a\ntry/catch will prevent this to fail in the future.","sha":"459224a1a5cb506d0e685691c233ddbcac84e8bb"}}]}] BACKPORT--> Co-authored-by: Sonia Sanz Vivas <[email protected]>
1 parent 847fdcf commit 98457f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
5252
});
5353

5454
after(async () => {
55-
// Delete the test pipeline
56-
await es.ingest.deletePipeline({ id: TEST_PIPELINE_NAME });
55+
const pipeline = await es.ingest.getPipeline({ id: TEST_PIPELINE_NAME });
56+
57+
// Only if the pipeline exists after all runs, we delete it
58+
if (pipeline) {
59+
await es.ingest.deletePipeline({ id: TEST_PIPELINE_NAME });
60+
}
5761
});
5862

5963
it('Displays the test pipeline in the list of pipelines', async () => {

0 commit comments

Comments
 (0)