use of org.graylog.plugins.views.search.export.AuditContext in project graylog2-server by Graylog2.
the class MessagesResourceTest method passesOnlyUserNameToAuditingExporterIfExportBasedOnRequest.
@Test
void passesOnlyUserNameToAuditingExporterIfExportBasedOnRequest() {
final SearchUser searchUser = TestSearchUser.builder().withUser(currentUser).build();
AtomicReference<AuditContext> context = captureAuditContext();
sut.retrieve(validRequest(), searchUser);
assertAll(() -> assertThat(context.get().userName()).isEqualTo(currentUser.getName()), () -> assertThat(context.get().searchId()).isEmpty(), () -> assertThat(context.get().searchTypeId()).isEmpty());
}
Aggregations