Run DDL, expect error; return the error string for assertions.
(state: &SharedState, identity: &AuthenticatedIdentity, sql: &str)
| 88 | |
| 89 | /// Run DDL, expect error; return the error string for assertions. |
| 90 | pub async fn ddl_err(state: &SharedState, identity: &AuthenticatedIdentity, sql: &str) -> String { |
| 91 | let result = ddl::dispatch(state, identity, sql, nodedb_types::id::DatabaseId::DEFAULT).await; |
| 92 | assert!(result.is_some(), "DDL not recognized: {sql}"); |
| 93 | let err = result.unwrap().unwrap_err(); |
| 94 | err.to_string() |
| 95 | } |
| 96 | |
| 97 | /// Run DDL and return the result without panicking on either branch. Useful |
| 98 | /// when the gate test only cares whether the privilege check fired (look for |