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>
25 lines
616 B
Rust
25 lines
616 B
Rust
#![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
|
|
})
|
|
}
|