Returns a temp dir guard (keep alive for test duration) and a catalog using it as warehouse.
()
| 433 | |
| 434 | /// Returns a temp dir guard (keep alive for test duration) and a catalog using it as warehouse. |
| 435 | fn create_test_catalog() -> (TempDir, FileSystemCatalog) { |
| 436 | let temp_dir = TempDir::new().unwrap(); |
| 437 | let warehouse = temp_dir.path().to_str().unwrap().to_string(); |
| 438 | let mut options = Options::new(); |
| 439 | options.set(CatalogOptions::WAREHOUSE, warehouse); |
| 440 | let catalog = FileSystemCatalog::new(options).unwrap(); |
| 441 | (temp_dir, catalog) |
| 442 | } |
| 443 | |
| 444 | fn testing_schema() -> Schema { |
| 445 | Schema::builder() |