refactor: remove SocialQueryPort — replaced by SocialQuery + FederationAdminQuery
-319 lines. Legacy SocialQueryPort trait, NoopSocialQueryPort, PanicSocialQueryPort all deleted. Federation repos now implement FederationAdminQuery (single method). get_users uses FederationAdminQuery. All other consumers use unified SocialQuery.
This commit is contained in:
@@ -2,7 +2,7 @@ use std::sync::Arc;
|
||||
|
||||
use domain::testing::{
|
||||
InMemoryGoalRepository, InMemorySocialRepository, InMemoryWrapUpRepository,
|
||||
InMemoryWrapUpStatsQuery, NoopSocialQueryPort,
|
||||
InMemoryWrapUpStatsQuery, NoopFederationAdminQuery,
|
||||
};
|
||||
use domain::{
|
||||
ports::{
|
||||
@@ -75,7 +75,7 @@ pub struct TestContextBuilder {
|
||||
pub review_logger: Arc<dyn ReviewLogger>,
|
||||
pub social_command: Arc<dyn domain::ports::SocialCommand>,
|
||||
pub social_query_unified: Arc<dyn domain::ports::SocialQuery>,
|
||||
pub social_query: Arc<dyn domain::ports::SocialQueryPort>,
|
||||
pub federation_admin: Arc<dyn domain::ports::FederationAdminQuery>,
|
||||
pub refresh_session_repo: Arc<dyn RefreshSessionRepository>,
|
||||
pub config: AppConfig,
|
||||
}
|
||||
@@ -127,7 +127,7 @@ impl TestContextBuilder {
|
||||
review_logger: Arc::new(NoopReviewLogger),
|
||||
social_command: Arc::clone(&social) as _,
|
||||
social_query_unified: Arc::clone(&social) as _,
|
||||
social_query: Arc::new(NoopSocialQueryPort),
|
||||
federation_admin: Arc::new(NoopFederationAdminQuery),
|
||||
refresh_session_repo: InMemoryRefreshSessionRepository::new(),
|
||||
config: AppConfig {
|
||||
allow_registration: true,
|
||||
@@ -273,11 +273,6 @@ impl TestContextBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_social_query(mut self, r: Arc<dyn domain::ports::SocialQueryPort>) -> Self {
|
||||
self.social_query = r;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_wrapup_repo(mut self, r: Arc<dyn WrapUpRepository>) -> Self {
|
||||
self.wrapup_repo = r;
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user