]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] Fix UCL config syntax and env variable names
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 17 Oct 2025 12:24:17 +0000 (13:24 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 17 Oct 2025 12:24:17 +0000 (13:24 +0100)
- 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

test/integration/configs/.clang-format-ignore [new file with mode: 0644]
test/integration/configs/fuzzy_check.conf
test/integration/configs/worker-fuzzy.inc
test/integration/configs/worker-normal.inc
test/integration/configs/worker-proxy.inc

diff --git a/test/integration/configs/.clang-format-ignore b/test/integration/configs/.clang-format-ignore
new file mode 100644 (file)
index 0000000..f375844
--- /dev/null
@@ -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
index 57654ac4e151a45349bbe96ee7efd18dc3d03cb9..884775b6f47f81ac4e4a889575e334e7c21dcb89 100644 (file)
@@ -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 = {
index 0d25d2e60f76bf9d805650fee746c513b1a35798..145c3c176fe8cbf488e6a0d9a7601a77b4eb7f18 100644 (file)
@@ -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 =}";
 }
index 05f448ef9fb6fd16fe9e329cc1f0aceb3e0c47a9..7bc27a2ed7a010aa6e5a08eebab2fb1ba05af000 100644 (file)
@@ -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 =}";
 }
index 36aa578962256e8ec01ac4bd700dc69e457c601e..d0269daf54f1161adbfe91ed6322816dc152a455 100644 (file)
@@ -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 =}";
 }