test: prepare complete channel fixtures for private delivery
This commit is contained in:
1 parent
d14555db46
commit
cef3f36ab3
1 file changed
+5
-2
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#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]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user