Update cipher logging

This commit is contained in:
2024-04-28 15:26:40 -04:00
parent 1183cab5f1
commit cc0aa2986d
26 changed files with 94 additions and 45 deletions

View File

@@ -53,4 +53,21 @@ public class CipherStreamControllerIntegrationTestBase{
verify(mdc, times(1)).put("url", url);
verify(mdc, times(1)).clear();
}
protected void verifyAspectLogging(ObjectNode jsonNode){
//Verify the MDC
jsonNode.fields().forEachRemaining(entry -> {
if(entry.getValue().isTextual()){
verify(mdc, times(1)).put(entry.getKey(), entry.getValue().asText());
}
else{
verify(mdc, times(1)).put(entry.getKey(), entry.getValue().toString());
}
});
verifyNoMoreInteractions(mdc);
//Verify the logger
verify(aspectLogger, times(1)).info("CipherStream log");
verifyNoMoreInteractions(aspectLogger);
}
}