From fbe6bf7a0ab445600b3a43562bdec94c491bd64b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 2 May 2021 20:34:43 +0100 Subject: [PATCH] [Test] Add a unit test for buckets variables in the mempool --- test/lua/unit/mempool.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.39.5