From 13b1ba71dd99cbe287274e1251ae08efc370dc85 Mon Sep 17 00:00:00 2001 From: Nasr Date: Fri, 27 Sep 2024 12:31:49 -0400 Subject: [PATCH] fmt --- crates/torii/core/src/sql_test.rs | 24 ++++++++++++++++--- crates/torii/graphql/src/tests/mod.rs | 8 ++++++- .../grpc/src/server/tests/entities_test.rs | 8 ++++++- crates/torii/libp2p/src/tests.rs | 8 ++++++- 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/crates/torii/core/src/sql_test.rs b/crates/torii/core/src/sql_test.rs index c4b7a6baf4..13f9898ee2 100644 --- a/crates/torii/core/src/sql_test.rs +++ b/crates/torii/core/src/sql_test.rs @@ -70,7 +70,13 @@ where #[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())] async fn test_load_from_remote(sequencer: &RunnerCtx) { let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true); - let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap(); + let pool = SqlitePoolOptions::new() + .min_connections(1) + .idle_timeout(None) + .max_lifetime(None) + .connect_with(options) + .await + .unwrap(); sqlx::migrate!("../migrations").run(&pool).await.unwrap(); let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/"); @@ -219,7 +225,13 @@ async fn test_load_from_remote(sequencer: &RunnerCtx) { #[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())] async fn test_load_from_remote_del(sequencer: &RunnerCtx) { let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true); - let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap(); + let pool = SqlitePoolOptions::new() + .min_connections(1) + .idle_timeout(None) + .max_lifetime(None) + .connect_with(options) + .await + .unwrap(); sqlx::migrate!("../migrations").run(&pool).await.unwrap(); let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/"); @@ -321,7 +333,13 @@ async fn test_load_from_remote_del(sequencer: &RunnerCtx) { #[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())] async fn test_update_with_set_record(sequencer: &RunnerCtx) { let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true); - let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap(); + let pool = SqlitePoolOptions::new() + .min_connections(1) + .idle_timeout(None) + .max_lifetime(None) + .connect_with(options) + .await + .unwrap(); sqlx::migrate!("../migrations").run(&pool).await.unwrap(); let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/"); diff --git a/crates/torii/graphql/src/tests/mod.rs b/crates/torii/graphql/src/tests/mod.rs index 427fe91210..858ef514fa 100644 --- a/crates/torii/graphql/src/tests/mod.rs +++ b/crates/torii/graphql/src/tests/mod.rs @@ -278,7 +278,13 @@ pub async fn model_fixtures(db: &mut Sql) { pub async fn spinup_types_test() -> Result { // change sqlite::memory: to sqlite:~/.test.db to dump database to disk let options = SqliteConnectOptions::from_str("")?.create_if_missing(true).with_regexp(); - let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap(); + let pool = SqlitePoolOptions::new() + .min_connections(1) + .idle_timeout(None) + .max_lifetime(None) + .connect_with(options) + .await + .unwrap(); sqlx::migrate!("../migrations").run(&pool).await.unwrap(); let setup = CompilerTestSetup::from_paths("../../dojo-core", &["../types-test"]); diff --git a/crates/torii/grpc/src/server/tests/entities_test.rs b/crates/torii/grpc/src/server/tests/entities_test.rs index 78482b74f5..c7eb0d94ca 100644 --- a/crates/torii/grpc/src/server/tests/entities_test.rs +++ b/crates/torii/grpc/src/server/tests/entities_test.rs @@ -34,7 +34,13 @@ use crate::types::schema::Entity; #[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())] async fn test_entities_queries(sequencer: &RunnerCtx) { let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true).with_regexp(); - let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap(); + let pool = SqlitePoolOptions::new() + .min_connections(1) + .idle_timeout(None) + .max_lifetime(None) + .connect_with(options) + .await + .unwrap(); sqlx::migrate!("../migrations").run(&pool).await.unwrap(); let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/"); diff --git a/crates/torii/libp2p/src/tests.rs b/crates/torii/libp2p/src/tests.rs index b2cc99720f..9749db0dc0 100644 --- a/crates/torii/libp2p/src/tests.rs +++ b/crates/torii/libp2p/src/tests.rs @@ -552,7 +552,13 @@ mod test { let options = ::from_str("") .unwrap() .create_if_missing(true); - let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap(); + let pool = SqlitePoolOptions::new() + .min_connections(1) + .idle_timeout(None) + .max_lifetime(None) + .connect_with(options) + .await + .unwrap(); sqlx::migrate!("../migrations").run(&pool).await.unwrap(); let sequencer = KatanaRunner::new().expect("Failed to create Katana sequencer");