commit fbe6bf7: [Test] Add a unit test for buckets variables in the mempool
Vsevolod Stakhov
vsevolod at highsecure.ru
Sun May 2 19:42:03 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-05-02 20:34:43 +0100
URL: https://github.com/rspamd/rspamd/commit/fbe6bf7a0ab445600b3a43562bdec94c491bd64b (HEAD -> master)
[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
More information about the Commits
mailing list