test: move sqlite-federation tests to tests/

No inline exceptions.
This commit is contained in:
2026-10-25 22:41:31 +01:00
parent 5118bf4700
commit ec22ac1d75
5 changed files with 11 additions and 17 deletions

View File

@@ -92,15 +92,3 @@ pub fn wire(
follow_query: social as _,
}
}
#[cfg(test)]
#[path = "tests/actor_block_tests.rs"]
mod actor_block_tests;
#[cfg(test)]
#[path = "tests/domain_block_tests.rs"]
mod domain_block_tests;
#[cfg(test)]
#[path = "tests/lib.rs"]
mod tests;

View File

@@ -0,0 +1,6 @@
#[path = "federation/actor_block_test.rs"]
mod actor_block_test;
#[path = "federation/announce_test.rs"]
mod announce_test;
#[path = "federation/domain_block_test.rs"]
mod domain_block_test;

View File

@@ -1,5 +1,5 @@
use super::*;
use k_ap::ActorBlocklist;
use sqlite_federation::SqliteFederationRepository;
use sqlx::SqlitePool;
async fn test_pool() -> SqlitePool {
@@ -25,7 +25,7 @@ async fn test_pool() -> SqlitePool {
}
#[tokio::test]
async fn block_and_check_actor() {
async fn blocked_actor_is_detected_listed_and_unblocked() {
let pool = test_pool().await;
let user_id = uuid::Uuid::parse_str(
&sqlx::query_scalar::<_, String>("SELECT id FROM users LIMIT 1")

View File

@@ -1,6 +1,6 @@
use super::*;
use chrono::Utc;
use k_ap::AnnounceRepository;
use sqlite_federation::SqliteFederationRepository;
use sqlx::SqlitePool;
async fn test_pool() -> SqlitePool {
@@ -11,7 +11,7 @@ async fn test_pool() -> SqlitePool {
}
#[tokio::test]
async fn add_announce_stores_and_counts() {
async fn added_announce_is_counted() {
let pool = test_pool().await;
let repo = SqliteFederationRepository::new(pool);
repo.add_announce(

View File

@@ -1,5 +1,5 @@
use super::*;
use k_ap::DomainBlocklist;
use sqlite_federation::SqliteFederationRepository;
use sqlx::SqlitePool;
async fn test_pool() -> SqlitePool {