test: move sqlite-federation tests to tests/
No inline exceptions.
This commit is contained in:
@@ -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;
|
||||
|
||||
6
crates/adapters/sqlite-federation/tests/federation.rs
Normal file
6
crates/adapters/sqlite-federation/tests/federation.rs
Normal 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;
|
||||
@@ -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")
|
||||
@@ -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(
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::*;
|
||||
use k_ap::DomainBlocklist;
|
||||
use sqlite_federation::SqliteFederationRepository;
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
async fn test_pool() -> SqlitePool {
|
||||
Reference in New Issue
Block a user