Skip to content

Commit

Permalink
print server version
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsofun committed Nov 11, 2024
1 parent 8ddd517 commit 8826ee1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions driver/tests/driver/temp_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ async fn test_temp_table(session_token_enabled: bool) {
let client = Client::new(dsn.to_string());
let conn = client.get_conn().await.unwrap();

let row = conn.query_row("select version()").await.unwrap();
assert!(row.is_some());
let row = row.unwrap();
let (val,): (String,) = row.try_into().unwrap();
println!("version = {}", val);

let _ = conn.exec("create temp table t1 (a int)").await.unwrap();
let n = conn.exec("insert into t1 values (1),(2)").await.unwrap();
assert_eq!(n, 2);
Expand Down
1 change: 1 addition & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ prepare:

up: prepare
docker compose up --quiet-pull -d databend --wait
curl -u root: -XPOST "http://localhost:8000/v1/query" -H 'Content-Type: application/json' -d '{"sql": "select version()", "pagination": { "wait_time_secs": 10}}'

start: up

Expand Down

0 comments on commit 8826ee1

Please sign in to comment.