Skip to content

Commit

Permalink
chore: update ttc yml (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li authored Jan 7, 2025
1 parent e3100b2 commit f7c7529
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ttc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
with:
push: true
file: ./ttc/Dockerfile
tags: datafuselabs/ttc-rust:$DOCKER_TAG
tags: datafuselabs/ttc-rust:${{ env.DOCKER_TAG }}
32 changes: 17 additions & 15 deletions core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,19 +1030,21 @@ mod test {
Ok(())
}

// #[tokio::test]
// async fn parse_encoded_password() -> Result<()> {
// let dsn = "databend://username:3a%40SC(nYE1k%3D%7B%7BR@localhost";
// let client = APIClient::from_dsn(dsn).await?;
// assert_eq!(client.password, Some("3a@SC(nYE1k={{R".to_string()));
// Ok(())
// }

// #[tokio::test]
// async fn parse_special_chars_password() -> Result<()> {
// let dsn = "databend://username:3a@SC(nYE1k={{R@localhost:8000";
// let client = APIClient::from_dsn(dsn).await?;
// assert_eq!(client.password, Some("3a@SC(nYE1k={{R".to_string()));
// Ok(())
// }
#[tokio::test]
async fn parse_encoded_password() -> Result<()> {
let dsn = "databend://username:3a%40SC(nYE1k%3D%7B%7BR@localhost";
let client = APIClient::from_dsn(dsn).await?;
assert_eq!(client.host(), "localhost");
assert_eq!(client.port(), 443);
Ok(())
}

#[tokio::test]
async fn parse_special_chars_password() -> Result<()> {
let dsn = "databend://username:3a@SC(nYE1k={{R@localhost:8000";
let client = APIClient::from_dsn(dsn).await?;
assert_eq!(client.host(), "localhost");
assert_eq!(client.port(), 8000);
Ok(())
}
}

0 comments on commit f7c7529

Please sign in to comment.