use { async_trait::async_trait, gluesql_core::prelude::Glue, gluesql_json_storage::JsonStorage, std::fs::remove_dir_all, test_suite::*, }; struct JsonTester { glue: Glue, } #[async_trait(?Send)] impl Tester for JsonTester { async fn new(namespace: &str) -> Self { let path = format!("tmp/{namespace}"); if let Err(e) = remove_dir_all(&path) { println!("fs::remove_file {:?}", e); }; let storage = JsonStorage::new(&path).expect("JsonStorage::new"); let glue = Glue::new(storage); JsonTester { glue } } fn get_glue(&mut self) -> &mut Glue { &mut self.glue } } generate_store_tests!(tokio::test, JsonTester);