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:
24
src/main/tests/smoke_async.rs
Normal file
24
src/main/tests/smoke_async.rs
Normal 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
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user