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
|
## 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
|
### 1. Getting source files
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ use tokio::io::AsyncReadExt;
|
||||||
use tokio_retry::strategy::FixedInterval;
|
use tokio_retry::strategy::FixedInterval;
|
||||||
use tokio_retry::RetryIf;
|
use tokio_retry::RetryIf;
|
||||||
use tokio_tungstenite::tungstenite::Message;
|
use tokio_tungstenite::tungstenite::Message;
|
||||||
use tracing::{event, instrument};
|
use tracing::{event, instrument, trace};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::retry::{RefreshTokenAction, RefreshTokenRetryCondition};
|
use crate::retry::{RefreshTokenAction, RefreshTokenRetryCondition};
|
||||||
|
|
@ -1024,6 +1024,7 @@ impl Client {
|
||||||
.into_data()
|
.into_data()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[instrument(level = "debug", skip_all, err)]
|
||||||
async fn http_client_with_auth(
|
async fn http_client_with_auth(
|
||||||
&self,
|
&self,
|
||||||
method: Method,
|
method: Method,
|
||||||
|
|
@ -1042,6 +1043,7 @@ impl Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
let access_token = self.access_token()?;
|
let access_token = self.access_token()?;
|
||||||
|
trace!("start request: {}, method: {}", url, method);
|
||||||
let request_builder = self
|
let request_builder = self
|
||||||
.cloud_client
|
.cloud_client
|
||||||
.request(method, url)
|
.request(method, url)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ use client_api::ws::{WSClient, WSClientConfig};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use shared_entity::dto::auth_dto::{UpdateUserParams, UserMetaData};
|
use shared_entity::dto::auth_dto::{UpdateUserParams, UserMetaData};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn update_but_not_logged_in() {
|
async fn update_but_not_logged_in() {
|
||||||
|
|
@ -76,6 +77,21 @@ async fn update_user_name() {
|
||||||
assert_eq!(profile.name.unwrap().as_str(), "lucas");
|
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]
|
#[tokio::test]
|
||||||
async fn update_user_metadata() {
|
async fn update_user_metadata() {
|
||||||
let (c, user) = generate_unique_registered_user_client().await;
|
let (c, user) = generate_unique_registered_user_client().await;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue