Skip to content

Commit

Permalink
Merge pull request #1726 from tursodatabase/lucio/harden-ci-tests
Browse files Browse the repository at this point in the history
tests: harden encryption tests
  • Loading branch information
LucioFranco authored Sep 10, 2024
2 parents 1013a3a + 01e4c0f commit 82df117
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
- name: clean build dir
run: rm -rf libsql-ffi/bundled/SQLite3MultipleCiphers/build
- name: embedded replica encryption tests
run: cargo test -F test-encryption --package libsql-server --test tests embedded_replica
run: cargo xtask test-encryption
windows:
runs-on: windows-latest
name: Windows checks
Expand Down
22 changes: 22 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fn try_main() -> Result<()> {
Some("build-wasm") => build_wasm(&arg)?,
Some("sim-tests") => sim_tests(&arg)?,
Some("test") => run_tests(&arg)?,
Some("test-encryption") => run_tests_encryption(&arg)?,
Some("publish") => publish(&arg)?,
_ => print_help(),
}
Expand All @@ -32,6 +33,7 @@ build builds all languages
build-wasm builds the wasm components in wasm32-unknown-unknown
build-bundled builds sqlite3 and updates the bundeled code for ffi
test runs the entire libsql test suite using nextest
test-encryption runs encryption tests for embedded replicas
sim-tests <test name> runs the libsql-server simulation test suite
publish-cratesio publish libsql client crates to crates.io
"
Expand Down Expand Up @@ -81,6 +83,26 @@ fn run_tests(arg: &str) -> Result<()> {
Ok(())
}

fn run_tests_encryption(arg: &str) -> Result<()> {
println!("installing nextest");
run_cargo(&["install", "--force", "cargo-nextest"])?;
println!("running nextest run");
run_cargo(&[
"nextest",
"run",
"-F",
"test-encryption",
"-p",
"libsql-server",
"--test",
"tests",
"embedded_replica",
arg,
])?;

Ok(())
}

fn sim_tests(arg: &str) -> Result<()> {
run_cargo(&["test", "--test", "tests", arg])?;

Expand Down

0 comments on commit 82df117

Please sign in to comment.