mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-15 17:59:41 +00:00
954029e31f
This adds a new `Builder` type that can now be used to construct the `Database` type. This will scale better as we add more varied options. This commit also deprecates the old builder types and will produce a warning that will push users to using the new `Builder` type. This will then allow us to remove the old deprecated constructors at some point in the future.
27 lines
626 B
Rust
27 lines
626 B
Rust
//! Test hrana related functionalities
|
|
#![allow(deprecated)]
|
|
|
|
use libsql_server::config::UserApiConfig;
|
|
use tempfile::tempdir;
|
|
|
|
use crate::common::net::{init_tracing, SimServer, TestServer};
|
|
mod batch;
|
|
mod transaction;
|
|
|
|
async fn make_standalone_server() -> Result<(), Box<dyn std::error::Error>> {
|
|
init_tracing();
|
|
let tmp = tempdir()?;
|
|
let server = TestServer {
|
|
path: tmp.path().to_owned().into(),
|
|
user_api_config: UserApiConfig {
|
|
hrana_ws_acceptor: None,
|
|
..Default::default()
|
|
},
|
|
..Default::default()
|
|
};
|
|
|
|
server.start_sim(8080).await?;
|
|
|
|
Ok(())
|
|
}
|