use of org.graylog.plugins.pipelineprocessor.EvaluationContext in project graylog2-server by Graylog2.
the class FunctionsSnippetsTest method keyValueFailure.
@Test
public void keyValueFailure() {
final Rule rule = parser.parseRule(ruleForTest(), true);
final EvaluationContext context = contextForRuleEval(rule, new Message("", "", Tools.nowUTC()));
assertThat(context.hasEvaluationErrors()).isTrue();
}
use of org.graylog.plugins.pipelineprocessor.EvaluationContext in project graylog2-server by Graylog2.
the class FunctionsSnippetsTest method comparisons.
@Test
public void comparisons() {
final Rule rule = parser.parseRule(ruleForTest(), false);
final EvaluationContext context = contextForRuleEval(rule, new Message("", "", Tools.nowUTC()));
assertThat(context.hasEvaluationErrors()).isFalse();
assertThat(evaluateRule(rule)).isNotNull();
assertThat(actionsTriggered.get()).isTrue();
}
Aggregations