chore: add logs
This commit is contained in:
parent
edc5d2bb9b
commit
b578c83cc9
|
|
@ -22,7 +22,7 @@ Ensure you have Docker Compose installed on your host server. Follow the officia
|
|||
|
||||
## Steps
|
||||
|
||||
> **🚀Note for AWS Users:** [Here](./EC2_SELF_HOST_GUIDE) is a step by step guide to self host AppFlowy Cloud on AWS EC2. Skip it if you are not using AWS.
|
||||
> **🚀Note for AWS Users:** [Here](./EC2_SELF_HOST_GUIDE.md) is a step by step guide to self host AppFlowy Cloud on AWS EC2. Skip it if you are not using AWS.
|
||||
|
||||
|
||||
### 1. Getting source files
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ use tokio::io::AsyncReadExt;
|
|||
use tokio_retry::strategy::FixedInterval;
|
||||
use tokio_retry::RetryIf;
|
||||
use tokio_tungstenite::tungstenite::Message;
|
||||
use tracing::{event, instrument};
|
||||
use tracing::{event, instrument, trace};
|
||||
use url::Url;
|
||||
|
||||
use crate::retry::{RefreshTokenAction, RefreshTokenRetryCondition};
|
||||
|
|
@ -1024,6 +1024,7 @@ impl Client {
|
|||
.into_data()
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip_all, err)]
|
||||
async fn http_client_with_auth(
|
||||
&self,
|
||||
method: Method,
|
||||
|
|
@ -1042,6 +1043,7 @@ impl Client {
|
|||
}
|
||||
|
||||
let access_token = self.access_token()?;
|
||||
trace!("start request: {}, method: {}", url, method);
|
||||
let request_builder = self
|
||||
.cloud_client
|
||||
.request(method, url)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use client_api::ws::{WSClient, WSClientConfig};
|
|||
use serde_json::json;
|
||||
use shared_entity::dto::auth_dto::{UpdateUserParams, UserMetaData};
|
||||
use std::time::Duration;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[tokio::test]
|
||||
async fn update_but_not_logged_in() {
|
||||
|
|
@ -76,6 +77,21 @@ async fn update_user_name() {
|
|||
assert_eq!(profile.name.unwrap().as_str(), "lucas");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn update_user_email() {
|
||||
let (c, user) = generate_unique_registered_user_client().await;
|
||||
c.sign_in_password(&user.email, &user.password)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let new_email = format!("{}@appflowy.io", Uuid::new_v4().to_string());
|
||||
c.update_user(UpdateUserParams::new().with_email(new_email.clone()))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let profile = c.get_profile().await.unwrap();
|
||||
assert_eq!(profile.email.unwrap().as_str(), &new_email);
|
||||
}
|
||||
#[tokio::test]
|
||||
async fn update_user_metadata() {
|
||||
let (c, user) = generate_unique_registered_user_client().await;
|
||||
|
|
|
|||
Loading…
Reference in New Issue