diff --git a/tests/test_dm_group_routes.c b/tests/test_dm_group_routes.c index f350ed76e..41d5f012f 100644 --- a/tests/test_dm_group_routes.c +++ b/tests/test_dm_group_routes.c @@ -4,6 +4,7 @@ #include #include #include "utun_instance.h" +#include "config_updater.h" #include "chat/chat_core.h" #include "chat/member_sync.h" #include "dm/dm_core.h" @@ -59,7 +60,8 @@ static int member(unsigned node, unsigned group, unsigned peer, const char* fiel } static void observed(struct ETCP_CONN* conn, struct ll_entry* entry) { - if (entry->len >= sizeof(struct SVC_ROUTE_HDR) && entry->dgram[ROUTER_SVC_ID_OFF] == ETCP_RT_ID_DM_MAILBOX) f.observed++; + if (entry->len >= sizeof(struct SVC_ROUTE_HDR) && entry->dgram[offsetof(struct SVC_ROUTE_HDR, svc_id)] == ETCP_RT_ID_DM_MAILBOX) + f.observed++; f.receiver(conn, entry); } @@ -127,7 +129,8 @@ static int setup(void) { REQUIRE(test_member_seed(inst, channel, node->my_keys.public_key, node->my_ed25519_pubkey, node->my_ed25519_privkey, owner->my_ed25519_privkey, "{}", tags, tag_signature) >= 0); } - f.group[local][g] = topo_groups_create_group(inst->topo_groups, 101 + g, TOPO_GROUP_TYPE_CHAT, channel); + REQUIRE(!chat_core_ensure_channel_ready(inst, channel)); + f.group[local][g] = topo_groups_find(inst->topo_groups, 101 + g); REQUIRE(f.group[local][g]); } }