use of org.graylog2.grok.GrokPattern in project graylog2-server by Graylog2.
the class V20191121145100_FixDefaultGrokPatternsTest method patternWasModified.
@Test
public void patternWasModified() throws ValidationException {
final GrokPattern pattern = GrokPattern.builder().name(PATTERN_NAME).pattern("modified").build();
when(grokPatternService.loadByName(PATTERN_NAME)).thenReturn(Optional.of(pattern));
migration.upgrade();
verify(grokPatternService, never()).update(any(GrokPattern.class));
verify(configService).write(MigrationCompleted.create(Collections.singleton(PATTERN_NAME)));
}
Aggregations