diff --git a/tests/test_group_connect.c b/tests/test_group_connect.c index f10a61948..ed7d74057 100644 --- a/tests/test_group_connect.c +++ b/tests/test_group_connect.c @@ -84,6 +84,7 @@ static void create(struct fixture* f, int device, int supernode) { assert(topo_node_sqlite_addrs_put(db, node->node_id, node) == 0); assert(topo_node_sqlite_member_block_put(db, "42", node->node_id, sig, 1, sig, 1, node->public_key, node->ed25519_public_key, "{}", NULL, 0, sig) == 0); + assert(sqlite3_exec(db, "UPDATE peers_42 SET admitted=1", NULL, NULL, NULL) == SQLITE_OK); if (i < 3) assert(topo_node_sqlite_member_owner_put(db, "42", node->node_id, "{\"supernode\":\"yes\"}", sig, 0) == 0); assert(topo_node_sqlite_nodeinfo_updated(db, node->node_id) == 0); topo_node_sqlite_update_rtt(db, node->node_id, (uint16_t)(i + 1)); diff --git a/tests/test_nat_detection.c b/tests/test_nat_detection.c index 06fc0a27f..2d942c2e9 100644 --- a/tests/test_nat_detection.c +++ b/tests/test_nat_detection.c @@ -252,6 +252,7 @@ static void test_all_groups_tcp(void) { assert(!topo_node_sqlite_member_block_put(db, "42", nodes[j]->node_id, signature, 1, signature, 1, nodes[j]->my_keys.public_key, nodes[j]->my_ed25519_pubkey, "{}", NULL, 0, signature)); } + assert(sqlite3_exec(db, "UPDATE peers_42 SET admitted=1", NULL, NULL, NULL) == SQLITE_OK); groups[i] = topo_groups_create_group(nodes[i]->topo_groups, 42, TOPO_GROUP_TYPE_CHAT, "42"); assert(groups[i]); } diff --git a/tests/test_node_snapshot.c b/tests/test_node_snapshot.c index c7f0a0f3d..5daf18a01 100644 --- a/tests/test_node_snapshot.c +++ b/tests/test_node_snapshot.c @@ -152,7 +152,7 @@ static void test_snapshot_format_upgrade(struct UTUN_INSTANCE* inst) { assert(!topo_node_sqlite_channel_put(db, "123", "upgrade", 7, inst->my_keys.public_key, NULL, inst->my_ed25519_pubkey, NULL, (const uint8_t[64]){0})); assert(!topo_node_sqlite_member_placeholder_put(db, "123", 7, inst->my_keys.public_key, inst->my_ed25519_pubkey)); - assert(sqlite3_exec(db, "UPDATE peers_123 SET source=0", NULL, NULL, NULL) == SQLITE_OK); + assert(sqlite3_exec(db, "UPDATE peers_123 SET source=0,admitted=1", NULL, NULL, NULL) == SQLITE_OK); struct topo_connect_peer* peers = NULL; size_t count = 0; assert(!topo_node_sqlite_get_connect_peers(db, "123", &peers, &count) && count == 1 && peers[0].client_type == UINT8_MAX); u_free(peers);