()
| 339 | |
| 340 | #[tokio::test] |
| 341 | async fn test_drop_table() { |
| 342 | let ctx = setup_test_server(vec!["default"]).await; |
| 343 | |
| 344 | // Add a table |
| 345 | ctx.server.add_table("default", "table_to_drop"); |
| 346 | |
| 347 | // Verify table exists |
| 348 | let tables = ctx.api.list_tables("default").await.unwrap(); |
| 349 | assert!(tables.contains(&"table_to_drop".to_string())); |
| 350 | |
| 351 | // Drop table |
| 352 | let result = ctx |
| 353 | .api |
| 354 | .drop_table(&Identifier::new("default", "table_to_drop")) |
| 355 | .await; |
| 356 | assert!(result.is_ok(), "failed to drop table: {result:?}"); |
| 357 | |
| 358 | // Verify table is gone |
| 359 | let tables = ctx.api.list_tables("default").await.unwrap(); |
| 360 | assert!(!tables.contains(&"table_to_drop".to_string())); |
| 361 | |
| 362 | // Dropping non-existent table should fail |
| 363 | let result = ctx |
| 364 | .api |
| 365 | .drop_table(&Identifier::new("default", "table_to_drop")) |
| 366 | .await; |
| 367 | assert!(result.is_err(), "dropping non-existent table should fail"); |
| 368 | } |
| 369 | |
| 370 | #[tokio::test] |
| 371 | async fn test_drop_table_no_permission() { |
nothing calls this directly
no test coverage detected