-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INGEST: Tests for Drop Processor (#33430)
* INGEST: Tests for Drop Processor * UT for behavior of dropped callback and drop processor * Moved drop processor to `server` project to enable this test * Simple IT * Relates #32278
- Loading branch information
1 parent
c4a687a
commit adea6b3
Showing
4 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/220_drop_processor.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
teardown: | ||
- do: | ||
ingest.delete_pipeline: | ||
id: "my_pipeline" | ||
ignore: 404 | ||
|
||
--- | ||
"Test Drop Processor": | ||
- do: | ||
ingest.put_pipeline: | ||
id: "my_pipeline" | ||
body: > | ||
{ | ||
"description" : "pipeline with drop", | ||
"processors" : [ | ||
{ | ||
"drop" : { | ||
"if": "ctx.foo == 'bar'" | ||
} | ||
} | ||
] | ||
} | ||
- match: { acknowledged: true } | ||
|
||
- do: | ||
index: | ||
index: test | ||
type: test | ||
id: 1 | ||
pipeline: "my_pipeline" | ||
body: { | ||
foo: "bar" | ||
} | ||
|
||
- do: | ||
index: | ||
index: test | ||
type: test | ||
id: 2 | ||
pipeline: "my_pipeline" | ||
body: { | ||
foo: "blub" | ||
} | ||
|
||
- do: | ||
catch: missing | ||
get: | ||
index: test | ||
type: test | ||
id: 1 | ||
- match: { found: false } | ||
|
||
- do: | ||
get: | ||
index: test | ||
type: test | ||
id: 2 | ||
- match: { _source.foo: "blub" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters