Use insta and criterion for main integration test and benches respectively.

docker/ci: Separate integration and unit tests and benches jobs.

Add directives to remove db before/after integration tests are performed.

Split start/run/stop phases; add more granular smoketests.

Split main integration tests into units for isolation.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-01 02:41:24 +00:00
parent 43f0882d83
commit 8d6bfde5a0
22 changed files with 373 additions and 100 deletions

View File

@@ -0,0 +1,24 @@
#![cfg(test)]
use insta::{assert_debug_snapshot, with_settings};
use tuwunel::Server;
use tuwunel_core::{Args, Result, runtime};
#[test]
fn smoke_async() -> Result {
with_settings!({
description => "Smoke Async",
snapshot_suffix => "smoke_async",
}, {
let args = Args::default_test(&["smoke", "fresh", "cleanup"]);
let runtime = runtime::new(Some(&args))?;
let server = Server::new(Some(&args), Some(runtime.handle()))?;
let result = runtime.block_on(async {
tuwunel::async_exec(&server).await
});
runtime::shutdown(&server.server, runtime)?;
assert_debug_snapshot!(result);
result
})
}