2626#include < realm/list.hpp>
2727#include < realm/set.hpp>
2828#include < realm/sync/noinst/client_history_impl.hpp>
29+ #include < realm/util/logger.hpp>
2930
3031#include < realm/object-store/audit.hpp>
3132#include < realm/object-store/audit_serializer.hpp>
4243#include < realm/object-store/sync/mongo_database.hpp>
4344#include < realm/object-store/sync/mongo_collection.hpp>
4445
45- #include < realm/util/logger.hpp>
46-
4746#include < catch2/catch_all.hpp>
48-
4947#include < external/json/json.hpp>
5048
5149using namespace realm ;
@@ -71,6 +69,13 @@ struct AuditEvent {
7169 std::map<std::string, std::string> metadata;
7270};
7371
72+ std::ostream& operator <<(std::ostream& os, const std::vector<AuditEvent>& events) {
73+ for (auto & event : events) {
74+ util::format (os, " %1: %2\n " , event.event , event.data );
75+ }
76+ return os;
77+ }
78+
7479util::Optional<std::string> to_optional_string (StringData sd)
7580{
7681 return sd ? util::Optional<std::string>(sd) : none;
@@ -1456,6 +1461,7 @@ TEST_CASE("audit management", "[sync][pbs][audit]") {
14561461 audit->wait_for_completion ();
14571462
14581463 auto events = get_audit_events (test_session);
1464+ INFO (events);
14591465 REQUIRE (events.size () == 6 );
14601466 std::string str = events[0 ].data .dump ();
14611467 // initial
0 commit comments