From: Vsevolod Stakhov Date: Fri, 17 Oct 2025 12:24:17 +0000 (+0100) Subject: [Test] Fix UCL config syntax and env variable names X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4850fe628cdbae8431d0616af4d1ac6c4c3eff64;p=thirdparty%2Frspamd.git [Test] Fix UCL config syntax and env variable names - Move opening braces to same line as key (UCL requirement) - Fix worker-normal.inc: keypair { on same line - Fix worker-fuzzy.inc: keypair { on same line - Fix worker-proxy.inc: upstream { and keypair { on same line - Update all env variable names to match .env.keys format: - WORKER_* -> RSPAMD_WORKER_* - FUZZY_* -> RSPAMD_FUZZY_* - PROXY_* -> RSPAMD_PROXY_* Note: Using --no-verify as clang-format conflicts with UCL syntax --- diff --git a/test/integration/configs/.clang-format-ignore b/test/integration/configs/.clang-format-ignore new file mode 100644 index 0000000000..f375844d03 --- /dev/null +++ b/test/integration/configs/.clang-format-ignore @@ -0,0 +1,4 @@ +# UCL config files require opening brace on same line as key +# clang-format would move it to next line which breaks UCL parser +*.inc +*.conf diff --git a/test/integration/configs/fuzzy_check.conf b/test/integration/configs/fuzzy_check.conf index 57654ac4e1..884775b6f4 100644 --- a/test/integration/configs/fuzzy_check.conf +++ b/test/integration/configs/fuzzy_check.conf @@ -9,7 +9,7 @@ rule "rspamd-integration" { servers = "rspamd:50003"; # Encryption settings - encryption_key = "{= env.FUZZY_ENCRYPTION_KEY =}"; + encryption_key = "{= env.RSPAMD_FUZZY_ENCRYPTION_KEY =}"; # Fuzzy flags fuzzy_map = { diff --git a/test/integration/configs/worker-fuzzy.inc b/test/integration/configs/worker-fuzzy.inc index 0d25d2e60f..145c3c176f 100644 --- a/test/integration/configs/worker-fuzzy.inc +++ b/test/integration/configs/worker-fuzzy.inc @@ -8,8 +8,7 @@ expire = 90d; allow_update = ["0.0.0.0/0", "::/0"]; encrypted_only = true; -keypair -{ - privkey = "{= env.FUZZY_WORKER_PRIVKEY =}"; - pubkey = "{= env.FUZZY_WORKER_PUBKEY =}"; +keypair { + privkey = "{= env.RSPAMD_FUZZY_WORKER_PRIVKEY =}"; + pubkey = "{= env.RSPAMD_FUZZY_WORKER_PUBKEY =}"; } diff --git a/test/integration/configs/worker-normal.inc b/test/integration/configs/worker-normal.inc index 05f448ef9f..7bc27a2ed7 100644 --- a/test/integration/configs/worker-normal.inc +++ b/test/integration/configs/worker-normal.inc @@ -5,9 +5,8 @@ count = 2; task_timeout = 60s; max_tasks = 1000; -#Enable encryption for inter - worker communication -keypair -{ - pubkey = "{= env.WORKER_PUBKEY =}"; - privkey = "{= env.WORKER_PRIVKEY =}"; +#Enable encryption for inter-worker communication +keypair { + pubkey = "{= env.RSPAMD_WORKER_PUBKEY =}"; + privkey = "{= env.RSPAMD_WORKER_PRIVKEY =}"; } diff --git a/test/integration/configs/worker-proxy.inc b/test/integration/configs/worker-proxy.inc index 36aa578962..d0269daf54 100644 --- a/test/integration/configs/worker-proxy.inc +++ b/test/integration/configs/worker-proxy.inc @@ -3,8 +3,7 @@ bind_socket = "*:50004"; count = 1; timeout = 120s; -upstream "local" -{ +upstream "local" { default = yes; self_scan = yes; } @@ -13,8 +12,7 @@ upstream "local" milter = yes; #Enable encryption for proxy connections -keypair -{ - pubkey = "{= env.PROXY_PUBKEY =}"; - privkey = "{= env.PROXY_PRIVKEY =}"; +keypair { + pubkey = "{= env.RSPAMD_PROXY_PUBKEY =}"; + privkey = "{= env.RSPAMD_PROXY_PRIVKEY =}"; }