remove flaky pragma cli tests.

Tests for similar behavior already covered in TCL and Rust connection api tests. So flaky problem in these is not worth exploring. We just removed them.
This commit is contained in:
sonhmai
2025-02-10 16:01:29 +07:00
parent 55058cade3
commit faab51ac35
3 changed files with 0 additions and 42 deletions

View File

@@ -1,6 +1,5 @@
mod common;
mod functions;
mod fuzz;
mod pragma;
mod query_processing;
mod wal;

View File

@@ -1 +0,0 @@
mod test_pragma_stmts;

View File

@@ -1,40 +0,0 @@
/// rexpect does not work on Windows.
/// https://github.com/rust-cli/rexpect/issues/11
#[cfg(not(target_os = "windows"))]
mod tests {
use assert_cmd::cargo::cargo_bin;
use rexpect::error::*;
use rexpect::session::{spawn_command, PtySession};
use std::process;
#[test]
fn test_pragma_journal_mode_wal() -> Result<(), Error> {
let mut child = spawn_command(run_cli(), Some(1000))?;
child.exp_regex("limbo>")?; // skip everything until limbo cursor appear
child.exp_regex(".?")?;
child.send_line("pragma journal_mode;")?;
child.exp_string("wal")?;
quit(&mut child)
}
#[test]
fn test_pragma_wal_checkpoint() -> Result<(), Error> {
let mut child = spawn_command(run_cli(), Some(1000))?;
child.exp_regex("limbo>")?; // skip everything until limbo cursor appear
child.exp_regex(".?")?;
child.send_line("pragma wal_checkpoint;")?;
child.exp_string("0|0|0")?;
quit(&mut child)
}
fn quit(child: &mut PtySession) -> Result<(), Error> {
child.send_line(".quit")?;
child.exp_eof()?;
Ok(())
}
fn run_cli() -> process::Command {
let bin_path = cargo_bin("limbo");
process::Command::new(bin_path)
}
}