Skip to content

Commit

Permalink
deugging
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Mar 26, 2024
1 parent 4e6249e commit cc48871
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/auth/src/user_provider/watch_file_user_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ impl WatchFileUserProvider {
info!("User provider file {} changed", &filepath);
match load_credential_from_file(&filepath) {
Ok(credential) => {
*users.lock().expect("users credential must be valid") = credential;
info!("User provider file {filepath} reloaded")
let mut users =
users.lock().expect("users credential must be valid");
#[cfg(not(test))]
info!("User provider file {filepath} reloaded");
#[cfg(test)]
info!("User provider file {filepath} reloaded: {credential:?}");
*users = credential;
}
Err(err) => {
warn!(
Expand Down Expand Up @@ -164,6 +169,8 @@ pub mod test {

#[tokio::test]
async fn test_file_provider() {
common_telemetry::init_default_ut_logging();

let dir = create_temp_dir("test_file_provider");
let file_path = format!("{}/test_file_provider", dir.path().to_str().unwrap());

Expand Down

0 comments on commit cc48871

Please sign in to comment.