Skip to content

Commit 01e4c0f

Browse files
committed
tests: harden encryption tests
1 parent 46f60b3 commit 01e4c0f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
- name: clean build dir
138138
run: rm -rf libsql-ffi/bundled/SQLite3MultipleCiphers/build
139139
- name: embedded replica encryption tests
140-
run: cargo test -F test-encryption --package libsql-server --test tests embedded_replica
140+
run: cargo xtask test-encryption
141141
windows:
142142
runs-on: windows-latest
143143
name: Windows checks

xtask/src/main.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ fn try_main() -> Result<()> {
1818
Some("build-wasm") => build_wasm(&arg)?,
1919
Some("sim-tests") => sim_tests(&arg)?,
2020
Some("test") => run_tests(&arg)?,
21+
Some("test-encryption") => run_tests_encryption(&arg)?,
2122
Some("publish") => publish(&arg)?,
2223
_ => print_help(),
2324
}
@@ -32,6 +33,7 @@ build builds all languages
3233
build-wasm builds the wasm components in wasm32-unknown-unknown
3334
build-bundled builds sqlite3 and updates the bundeled code for ffi
3435
test runs the entire libsql test suite using nextest
36+
test-encryption runs encryption tests for embedded replicas
3537
sim-tests <test name> runs the libsql-server simulation test suite
3638
publish-cratesio publish libsql client crates to crates.io
3739
"
@@ -81,6 +83,26 @@ fn run_tests(arg: &str) -> Result<()> {
8183
Ok(())
8284
}
8385

86+
fn run_tests_encryption(arg: &str) -> Result<()> {
87+
println!("installing nextest");
88+
run_cargo(&["install", "--force", "cargo-nextest"])?;
89+
println!("running nextest run");
90+
run_cargo(&[
91+
"nextest",
92+
"run",
93+
"-F",
94+
"test-encryption",
95+
"-p",
96+
"libsql-server",
97+
"--test",
98+
"tests",
99+
"embedded_replica",
100+
arg,
101+
])?;
102+
103+
Ok(())
104+
}
105+
84106
fn sim_tests(arg: &str) -> Result<()> {
85107
run_cargo(&["test", "--test", "tests", arg])?;
86108

0 commit comments

Comments
 (0)