httpd: Move test utility mod from inside api to root

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
This commit is contained in:
xphoniex
2023-02-22 17:06:32 +01:00
committed by Alexis Sellier
parent 1185a1fc6b
commit b0b94fea18
8 changed files with 19 additions and 17 deletions
+6 -3
View File
@@ -1,5 +1,4 @@
#[cfg(test)]
pub mod test;
pub mod auth;
use std::collections::HashMap;
use std::sync::Arc;
@@ -21,7 +20,6 @@ use radicle::identity::Id;
use radicle::storage::{ReadRepository, ReadStorage};
use radicle::Profile;
mod auth;
mod axum_extra;
mod error;
mod json;
@@ -70,6 +68,11 @@ impl Context {
pub fn profile(&self) -> &Arc<Profile> {
&self.profile
}
#[cfg(test)]
pub fn sessions(&self) -> &Arc<RwLock<HashMap<SessionId, auth::Session>>> {
&self.sessions
}
}
pub fn router(ctx: Context) -> Router {