aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-02 20:34:43 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-02 20:34:43 +0100
commitfbe6bf7a0ab445600b3a43562bdec94c491bd64b (patch)
tree3b2ae77f0767f569fffd16fa69c0c7b963b864c8
parentc9167ec1e4c5d72770c2cefb00869fd8a0c14d49 (diff)
downloadrspamd-fbe6bf7a0ab445600b3a43562bdec94c491bd64b.tar.gz
rspamd-fbe6bf7a0ab445600b3a43562bdec94c491bd64b.zip
[Test] Add a unit test for buckets variables in the mempool
-rw-r--r--test/lua/unit/mempool.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/lua/unit/mempool.lua b/test/lua/unit/mempool.lua
index 7bb404646..fefd3d279 100644
--- a/test/lua/unit/mempool.lua
+++ b/test/lua/unit/mempool.lua
@@ -33,7 +33,15 @@ context("Memory pool unit tests", function()
assert_equal(v2, 1)
assert_equal(v3, 1.01)
assert_equal(v4, false)
-
+
+ local t = {1,2,3,4,5}
+ pool:set_variable('a', t)
+ local bucket = pool:get_variable('a', 'bucket')
+ assert_rspamd_table_eq({
+ expect = t,
+ actual = bucket
+ })
+
pool:destroy()
end)
end) \ No newline at end of file