feat(domain): ActorConnectionSummary, ConnectionType, RemoteActorConnectionRepository, FetchActorConnections event
This commit is contained in:
@@ -575,6 +575,52 @@ impl FederationActionPort for TestStore {
|
||||
) -> Result<Vec<crate::models::remote_note::RemoteNote>, DomainError> {
|
||||
Ok(vec![])
|
||||
}
|
||||
|
||||
async fn fetch_actor_urls_from_collection(
|
||||
&self,
|
||||
_collection_url: &str,
|
||||
) -> Result<Vec<String>, DomainError> {
|
||||
Ok(vec![])
|
||||
}
|
||||
|
||||
async fn resolve_actor_profiles(
|
||||
&self,
|
||||
_urls: Vec<String>,
|
||||
) -> Vec<crate::models::actor_connection_summary::ActorConnectionSummary> {
|
||||
vec![]
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl RemoteActorConnectionRepository for TestStore {
|
||||
async fn upsert_connections(
|
||||
&self,
|
||||
_actor_url: &str,
|
||||
_connection_type: &str,
|
||||
_page: u32,
|
||||
_actors: &[crate::models::actor_connection_summary::ActorConnectionSummary],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn list_connections(
|
||||
&self,
|
||||
_actor_url: &str,
|
||||
_connection_type: &str,
|
||||
_page: u32,
|
||||
) -> Result<Vec<crate::models::actor_connection_summary::ActorConnectionSummary>, DomainError>
|
||||
{
|
||||
Ok(vec![])
|
||||
}
|
||||
|
||||
async fn connection_page_age(
|
||||
&self,
|
||||
_actor_url: &str,
|
||||
_connection_type: &str,
|
||||
_page: u32,
|
||||
) -> Result<Option<chrono::DateTime<chrono::Utc>>, DomainError> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
@@ -851,6 +897,25 @@ mod federation_port_tests {
|
||||
.unwrap();
|
||||
assert!(notes.is_empty());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_store_resolve_actor_profiles_returns_empty() {
|
||||
let store = TestStore::default();
|
||||
let result = store
|
||||
.resolve_actor_profiles(vec!["https://example.com/users/alice".into()])
|
||||
.await;
|
||||
assert!(result.is_empty());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_store_fetch_collection_urls_returns_empty() {
|
||||
let store = TestStore::default();
|
||||
let urls = store
|
||||
.fetch_actor_urls_from_collection("https://example.com/users/alice/followers")
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(urls.is_empty());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user