Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Gao Binlong <[email protected]>
  • Loading branch information
gaobinlong committed Jan 30, 2024
1 parent 130d6dd commit cf3722d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class RemoveByPatternProcessor extends AbstractProcessor {
) {
super(tag, description);
if (fieldPatterns != null && excludeFieldPatterns != null || fieldPatterns == null && excludeFieldPatterns == null) {
throw new IllegalArgumentException("ether fieldPatterns and excludeFieldPatterns must be set");
throw new IllegalArgumentException("either fieldPatterns and excludeFieldPatterns must be set");
}
if (fieldPatterns == null) {
this.fieldPatterns = null;
Expand Down Expand Up @@ -124,7 +124,7 @@ public RemoveByPatternProcessor create(
TYPE,
processorTag,
"field_pattern",
"ether field_pattern or exclude_field_pattern must be set"
"either field_pattern or exclude_field_pattern must be set"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ public void testCreatePatternsFailed() throws Exception {
OpenSearchParseException.class,
() -> factory.create(null, processorTag, null, config)
);
assertThat(exception.getMessage(), equalTo("[field_pattern] ether field_pattern or exclude_field_pattern must be set"));
assertThat(exception.getMessage(), equalTo("[field_pattern] either field_pattern or exclude_field_pattern must be set"));

Map<String, Object> config2 = new HashMap<>();
config2.put("field_pattern", null);
config2.put("exclude_field_pattern", null);

exception = expectThrows(OpenSearchParseException.class, () -> factory.create(null, processorTag, null, config2));
assertThat(exception.getMessage(), equalTo("[field_pattern] ether field_pattern or exclude_field_pattern must be set"));
assertThat(exception.getMessage(), equalTo("[field_pattern] either field_pattern or exclude_field_pattern must be set"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void testRemoveWithExcludeFieldPatterns() throws Exception {

public void testCreateRemoveByPatternProcessorWithBothFieldsAndExcludeFields() throws Exception {
assertThrows(
"ether fieldPatterns and excludeFieldPatterns must be set",
"either fieldPatterns and excludeFieldPatterns must be set",
IllegalArgumentException.class,
() -> new RemoveByPatternProcessor(randomAlphaOfLength(10), null, null, null)
);
Expand All @@ -88,7 +88,7 @@ public void testCreateRemoveByPatternProcessorWithBothFieldsAndExcludeFields() t
}

assertThrows(
"ether fieldPatterns and excludeFieldPatterns must be set",
"either fieldPatterns and excludeFieldPatterns must be set",
IllegalArgumentException.class,
() -> new RemoveByPatternProcessor(randomAlphaOfLength(10), null, fieldPatterns, excludeFieldPatterns)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ teardown:
version: " - 2.11.99"
reason: "introduced in 2.12.0"
- do:
catch: /\[field\_pattern\] ether field\_pattern or exclude\_field\_pattern must be set/
catch: /\[field\_pattern\] either field\_pattern or exclude\_field\_pattern must be set/
ingest.put_pipeline:
id: "my_pipeline"
body: >
Expand All @@ -28,7 +28,7 @@ teardown:
}
- do:
catch: /\[field\_pattern\] ether field\_pattern or exclude\_field\_pattern must be set/
catch: /\[field\_pattern\] either field\_pattern or exclude\_field\_pattern must be set/
ingest.put_pipeline:
id: "my_pipeline"
body: >
Expand Down

0 comments on commit cf3722d

Please sign in to comment.