()
| 203 | |
| 204 | #[tokio::test] |
| 205 | async fn test_drop_database() { |
| 206 | let ctx = setup_test_server(vec!["default", "to_drop"]).await; |
| 207 | |
| 208 | // Verify database exists |
| 209 | let dbs = ctx.api.list_databases().await.unwrap(); |
| 210 | assert!(dbs.contains(&"to_drop".to_string())); |
| 211 | |
| 212 | // Drop database |
| 213 | let result = ctx.api.drop_database("to_drop").await; |
| 214 | assert!(result.is_ok(), "failed to drop database: {result:?}"); |
| 215 | |
| 216 | // Verify database is gone |
| 217 | let dbs = ctx.api.list_databases().await.unwrap(); |
| 218 | assert!(!dbs.contains(&"to_drop".to_string())); |
| 219 | |
| 220 | // Dropping non-existent database should fail |
| 221 | let result = ctx.api.drop_database("to_drop").await; |
| 222 | assert!( |
| 223 | result.is_err(), |
| 224 | "dropping non-existent database should fail" |
| 225 | ); |
| 226 | } |
| 227 | |
| 228 | #[tokio::test] |
| 229 | async fn test_drop_database_no_permission() { |
nothing calls this directly
no test coverage detected