]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Test] composites: functional test for dynamic UCL composites map 6064/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 26 May 2026 20:57:47 +0000 (21:57 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 26 May 2026 20:57:47 +0000 (21:57 +0100)
commit34cedd157a640fca8006422943cfaa40f69e5e8c
tree1acd18b3adb2c883fe845df5f32628e95d97b73d
parent4c886a7324bcc844c27a4d10e7a9e0e8e38778ec
[Test] composites: functional test for dynamic UCL composites map

Exercises load -> reload-with-update -> reload-with-stub:
 1. INITIAL MAP - DYN_ONE FIRES: load composites from map.1, scan a
    message, confirm DYN_ONE and DYN_TWO fire with their declared
    scores. Static composite STATIC_COMP also fires alongside.
 2. RELOAD - UPDATED SCORES AND NEW NAME: swap to map.2 (DYN_ONE
    score updated, DYN_TWO removed, DYN_THREE introduced), wait for
    the map watcher, scan, confirm new scores + new composite +
    DYN_TWO gone (stubbed).
 3. RELOAD - REMOVED COMPOSITE BECOMES STUB: swap back to map.1.
    DYN_ONE/DYN_TWO are back with original scores, DYN_THREE was in
    the previous generation but is now absent -> verifies the stub
    path keeps the name out of scan results.

Lua plugin registers DYN_BASE_A/B/C as always-firing atomic symbols
so the composite expressions resolve deterministically. Config sets
map_watch_interval = 0.5s for tight reload turnaround.
test/functional/cases/119_dynamic_composites.robot [new file with mode: 0644]
test/functional/configs/dynamic_composites.conf [new file with mode: 0644]
test/functional/configs/maps/dynamic_composites.map.1 [new file with mode: 0644]
test/functional/configs/maps/dynamic_composites.map.2 [new file with mode: 0644]
test/functional/lua/dynamic_composites.lua [new file with mode: 0644]