Skip to content

Commit

Permalink
Fix typo and skip some yml test by version
Browse files Browse the repository at this point in the history
Signed-off-by: Gao Binlong <[email protected]>
  • Loading branch information
gaobinlong committed Nov 17, 2023
1 parent 26fc728 commit cd50504
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ private static Consumer<IngestDocument> buildExecution(
final Function<String, String> valueTrimmer = buildTrimmer(trimValue);

String path = document.renderTemplate(field);
final boolean filedPathNullOrEmpty = Strings.isNullOrEmpty(path);
if (filedPathNullOrEmpty || document.hasField(path, true) == false) {
final boolean fieldPathNullOrEmpty = Strings.isNullOrEmpty(path);
if (fieldPathNullOrEmpty || document.hasField(path, true) == false) {
if (ignoreMissing) {
return;
} else if (filedPathNullOrEmpty) {
} else if (fieldPathNullOrEmpty) {
throw new IllegalArgumentException("field path cannot be null nor empty");
} else {
throw new IllegalArgumentException("field [" + path + "] doesn't exist");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ teardown:

---
"Test KV Processor with template snippets":
- skip:
version: " - 2.11.99"
reason: "KV Processor with template snippets is only supported since 2.12.0"

- do:
ingest.put_pipeline:
id: "1"
Expand Down Expand Up @@ -80,6 +84,10 @@ teardown:

---
"Test KV Processor with non-existing field and without ignore_missing":
- skip:
version: " - 2.11.99"
reason: "KV Processor with template snippets is only supported since 2.12.0"

- do:
ingest.put_pipeline:
id: "1"
Expand Down Expand Up @@ -141,6 +149,10 @@ teardown:

---
"Test KV Processor with non-existing field and ignore_missing":
- skip:
version: " - 2.11.99"
reason: "KV Processor with template snippets is only supported since 2.12.0"

- do:
ingest.put_pipeline:
id: "1"
Expand Down

0 comments on commit cd50504

Please sign in to comment.