0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 17:59:41 +00:00
Lucio Franco 954029e31f
libsql: add Builder to construct the db (#993)
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.
2024-02-06 13:59:11 +00:00

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(())
}