MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_write_query_rejection

Function test_write_query_rejection

src/session/read_only_handler.rs:205–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203
204 #[tokio::test]
205 async fn test_write_query_rejection() {
206 let config = Arc::new(Config::load());
207 let handler = ReadOnlyDbHandler::new(":memory:", config).unwrap();
208
209 let result = handler.query("INSERT INTO test VALUES (1)").await;
210 assert!(matches!(result, Err(ReadOnlyError::WriteNotAllowed)));
211 }
212}

Callers

nothing calls this directly

Calls 1

queryMethod · 0.45

Tested by

no test coverage detected