From: Vsevolod Stakhov Date: Sun, 2 May 2021 19:34:43 +0000 (+0100) Subject: [Test] Add a unit test for buckets variables in the mempool X-Git-Tag: 3.0~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbe6bf7a0ab445600b3a43562bdec94c491bd64b;p=thirdparty%2Frspamd.git [Test] Add a unit test for buckets variables in the mempool --- diff --git a/test/lua/unit/mempool.lua b/test/lua/unit/mempool.lua index 7bb4046468..fefd3d279c 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