╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │644 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │645 const first_issue = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), first_issue_map, .issue); │ │646 │ │636 - try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.description, first_issue.issue.?.description);│ │637 - try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.tags, first_issue.issue.?.tags); │ │647 + try std.testing.expectEqualStrings(events_to_consume2[0].data.?.issue.description, first_issue.issue.description); │ │648 + try std.testing.expectEqualStrings(events_to_consume2[0].data.?.issue.tags, first_issue.issue.tags); │ │649 } │ │650 } │ │651 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │725 const events_to_consume3 = [_]evt.Event{ │ │726 .{ │ │727 .id = events_to_consume[0].id, │ │728 + .kind = .issue, │ │729 .data = .{ │ │730 .issue = .{ │ │731 .title = "Login form clears password on validation error",│ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │736 }, │ │737 .{ │ │738 .id = events_to_consume[0].id, │ │739 + .kind = .issue, │ │740 .data = .{ │ │741 .issue = .{ │ │742 .title = "Login form clears password on validation error",│ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │843 const events_to_consume = [_]evt.Event{ │ │844 .{ │ │845 .id = std.fmt.bytesToHex(user_event_id, .lower),│ │846 + .kind = .user, │ │847 .data = .{ │ │848 .user = .{ │ │849 .name = "Alice Example", │ ╰─────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │855 // this event edits the previous one because it has the same id│ │856 .{ │ │857 .id = std.fmt.bytesToHex(user_event_id, .lower), │ │858 + .kind = .user, │ │859 .data = .{ │ │860 .user = .{ │ │861 .name = "Alice Example", │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │866 }, │ │867 .{ │ │868 .id = std.fmt.bytesToHex(repo_event_id, .lower),│ │869 + .kind = .repo, │ │870 .data = .{ │ │871 .repo = .{ │ │872 .user_id = &user_event_id, │ ╰─────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │934 const user = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), user_map, .user); │ │935 │ │936 // the password was correctly edited │ │921 - try std.testing.expectEqualStrings(events_to_consume[1].data.user.?.password_hash, user.user.?.password_hash); │ │937 + try std.testing.expectEqualStrings(events_to_consume[1].data.?.user.password_hash, user.user.password_hash); │ │938 │ │939 // get the map of repos │ │940 const event_id_to_repo_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->repo")) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │945 const repo_map = try Repo.DB.HashMap(.read_only).init(repo_cursor); │ │946 const repo_event = try evt.EventData.read(Repo.DB, repo_opts.hash, arena.allocator(), repo_map, .repo); │ │947 │ │932 - try std.testing.expectEqualSlices(u8, &user_event_id, repo_event.repo.?.user_id); │ │933 - try std.testing.expectEqualStrings("ziglings", repo_event.repo.?.name); │ │948 + try std.testing.expectEqualSlices(u8, &user_event_id, repo_event.repo.user_id); │ │949 + try std.testing.expectEqualStrings("ziglings", repo_event.repo.name); │ │950 │ │951 // get the repos created by the user │ │952 const user_id_to_repos_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "user-id->repos")) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │967 const events_to_consume2 = [_]evt.Event{ │ │968 .{ │ │969 .id = std.fmt.bytesToHex(repo_event_id, .lower),│ │954 - .data = .{ │ │955 - .repo = null, │ │956 - }, │ │970 + .kind = .repo, │ │971 + .data = null, │ │972 }, │ │973 }; │ │974 │ ╰─────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │1039 const events_to_consume3 = [_]evt.Event{ │ │1040 .{ │ │1041 .id = std.fmt.bytesToHex(user_event_id, .lower),│ │1027 - .data = .{ │ │1028 - .user = null, │ │1029 - }, │ │1042 + .kind = .user, │ │1043 + .data = null, │ │1044 }, │ │1045 }; │ │1046 │ ╰──────────────────────────────────────────────────────────────────╯