Skip to content

Commit

Permalink
Fix cross_process tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Salinas authored and Daniel Salinas committed Jan 17, 2025
1 parent 05c0649 commit 585ec15
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions crates/matrix-sdk/src/oidc/cross_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ mod tests {

use super::compute_session_hash;
use crate::{
authentication::{ReloadSessionCallback, SaveSessionCallback, SessionCallbackError},
authentication::{
ReloadSessionCallback, SaveSessionCallback, SessionCallbackError, SessionTokens,
},
oidc::{
backend::mock::{MockImpl, ISSUER_URL},
cross_process::SessionHash,
Expand All @@ -273,7 +275,7 @@ mod tests {
Oidc, OidcSessionTokens,
},
test_utils::test_client_builder,
Error,
Client, Error,
};

struct TestReloadSessionCallback {
Expand All @@ -284,7 +286,7 @@ mod tests {
impl ReloadSessionCallback for TestReloadSessionCallback {
async fn reload_session(
&self,
client: matrix_sdk::Client,
client: Client,
) -> Result<SessionTokens, SessionCallbackError> {
crate::authentication::SessionTokens::Oidc(self.tokens.clone())
}
Expand All @@ -294,10 +296,7 @@ mod tests {

#[async_trait::async_trait]
impl SaveSessionCallback for TestSaveSessionCallback {
async fn save_session(
&self,
client: matrix_sdk::Client,
) -> Result<(), SessionCallbackError> {
async fn save_session(&self, client: Client) -> Result<(), SessionCallbackError> {
panic!("save_session_callback shouldn't be called here")
}
}
Expand Down Expand Up @@ -577,7 +576,7 @@ mod tests {
}

client.set_session_callbacks(
Box::new(TestReloadSessionCallback { tokens: next_tokens }),
Box::new(TestReloadSessionCallback { tokens: next_tokens.clone() }),
Box::new(TestSaveSessionCallback {}),
)?;

Expand Down

0 comments on commit 585ec15

Please sign in to comment.