diff options
Diffstat (limited to 'server')
| -rw-r--r-- | server/src/auth.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/auth.rs b/server/src/auth.rs index c76bd82..4889f78 100644 --- a/server/src/auth.rs +++ b/server/src/auth.rs @@ -50,7 +50,7 @@ struct Login<'r> { } #[derive(Debug, Deserialize)] -#[allow(dead_code)] +#[cfg_attr(test, allow(dead_code))] struct AuthConfig<'a> { session_max_age_days: u32, ldap_url: Cow<'a, str>, @@ -67,6 +67,7 @@ struct Sessions { data: Mutex<SessionsData>, } +#[cfg_attr(test, allow(dead_code))] struct LdapState { ldap: OnceLock<ldap3::Ldap>, } @@ -283,6 +284,7 @@ fn unauthorized() -> Json<api_model::StatusResponse> { Json(STATUS_UNAUTHORIZED) } +#[cfg_attr(test, allow(dead_code))] async fn setup_ldap( ldap_state: &LdapState, config: &AuthConfig<'_>, @@ -304,6 +306,7 @@ enum LdapOrSqlError { SqlError(sqlx::Error), } +#[cfg_attr(test, allow(dead_code))] async fn sync_ldap( ldap_state: &LdapState, config: &AuthConfig<'_>, |
