docs: generate gitea wiki pages + publish script
add wiki/ markdown pages (Home, Sidebar, architecture, transport, developer, usage) add scripts/publish_gitea_wiki.sh to sync wiki repo fix: serialize aggregate env-setting tests to avoid parallel env var races
This commit is contained in:
@@ -205,8 +205,16 @@ mod tests {
|
||||
use super::*;
|
||||
use tempfile::tempdir;
|
||||
|
||||
fn env_lock() -> std::sync::MutexGuard<'static, ()> {
|
||||
static LOCK: std::sync::OnceLock<std::sync::Mutex<()>> = std::sync::OnceLock::new();
|
||||
LOCK.get_or_init(|| std::sync::Mutex::new(()))
|
||||
.lock()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_from_env() {
|
||||
let _guard = env_lock();
|
||||
std::env::set_var("AGGREGATE_NATS_URL", "nats://localhost:4222");
|
||||
let settings = Settings::from_env().unwrap();
|
||||
assert_eq!(settings.nats_url, "nats://localhost:4222");
|
||||
@@ -224,6 +232,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn settings_from_yaml_file_and_env_override() {
|
||||
let _guard = env_lock();
|
||||
let dir = tempdir().unwrap();
|
||||
let file_path = dir.path().join("aggregate.yaml");
|
||||
std::fs::write(
|
||||
|
||||
Reference in New Issue
Block a user