diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-10 11:22:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 11:22:12 +0100 |
commit | 819de7eed4997268ebeb26809e2178f958f504f0 (patch) | |
tree | 9b0d7aa664a725d555cda30752bd28da01299a00 | |
parent | 374f1a04be5f562c66d0a27f7580966329059301 (diff) | |
parent | 60b2f09394481bef02238e267c3f4dfed902c725 (diff) | |
download | rspamd-819de7eed4997268ebeb26809e2178f958f504f0.tar.gz rspamd-819de7eed4997268ebeb26809e2178f958f504f0.zip |
Merge pull request #2476 from negram/fix-milter-test
Fix milter test
-rw-r--r-- | test/functional/cases/180_milter.robot | 2 | ||||
-rw-r--r-- | test/functional/lua/miltertest/combined.lua | 4 | ||||
-rw-r--r-- | test/functional/lua/miltertest/lib.lua | 5 | ||||
-rw-r--r-- | test/functional/lua/miltertest/mt1.lua | 4 | ||||
-rw-r--r-- | test/functional/lua/miltertest/mt2.lua | 4 | ||||
-rw-r--r-- | test/functional/lua/miltertest/mt3.lua | 4 | ||||
-rw-r--r-- | test/functional/lua/miltertest/mt4.lua | 4 |
7 files changed, 16 insertions, 11 deletions
diff --git a/test/functional/cases/180_milter.robot b/test/functional/cases/180_milter.robot index 814fd0de5..23a366814 100644 --- a/test/functional/cases/180_milter.robot +++ b/test/functional/cases/180_milter.robot @@ -36,4 +36,6 @@ Milter Test ... cwd=${TESTDIR}/lua/miltertest Follow Rspamd Log Should Match Regexp ${result.stderr} ^$ + Log ${result.rc} + Log ${result.stdout} Should Be Equal As Integers ${result.rc} 0 msg=${result.stdout} values=false diff --git a/test/functional/lua/miltertest/combined.lua b/test/functional/lua/miltertest/combined.lua index 964fa878a..69fa2d6f1 100644 --- a/test/functional/lua/miltertest/combined.lua +++ b/test/functional/lua/miltertest/combined.lua @@ -1,7 +1,7 @@ -- Combine tests -require './lib' -require './data' +dofile './lib.lua' +dofile './data.lua' setup() diff --git a/test/functional/lua/miltertest/lib.lua b/test/functional/lua/miltertest/lib.lua index f7dc3cc79..e94efd559 100644 --- a/test/functional/lua/miltertest/lib.lua +++ b/test/functional/lua/miltertest/lib.lua @@ -21,7 +21,10 @@ function setup(c_ip, helo, hn) end function teardown() - mt.disconnect(conn) + if conn then + mt.disconnect(conn) + end + conn = nil end function send_message(body, hdrs, id, sender, rcpts) diff --git a/test/functional/lua/miltertest/mt1.lua b/test/functional/lua/miltertest/mt1.lua index 20aa3262f..019a85210 100644 --- a/test/functional/lua/miltertest/mt1.lua +++ b/test/functional/lua/miltertest/mt1.lua @@ -1,7 +1,7 @@ print('Check we will accept a message') -require './lib' -require './data' +dofile './lib.lua' +dofile './data.lua' setup() diff --git a/test/functional/lua/miltertest/mt2.lua b/test/functional/lua/miltertest/mt2.lua index 56ea6f639..1c8fa83d8 100644 --- a/test/functional/lua/miltertest/mt2.lua +++ b/test/functional/lua/miltertest/mt2.lua @@ -1,7 +1,7 @@ print('Check we will reject a message') -require './lib' -require './data' +dofile './lib.lua' +dofile './data.lua' setup() diff --git a/test/functional/lua/miltertest/mt3.lua b/test/functional/lua/miltertest/mt3.lua index 1fc1cc4be..6b30126e5 100644 --- a/test/functional/lua/miltertest/mt3.lua +++ b/test/functional/lua/miltertest/mt3.lua @@ -1,7 +1,7 @@ print('Check we will rewrite subjects') -require './lib' -require './data' +dofile './lib.lua' +dofile './data.lua' setup() diff --git a/test/functional/lua/miltertest/mt4.lua b/test/functional/lua/miltertest/mt4.lua index 0fc69e477..300cf69fb 100644 --- a/test/functional/lua/miltertest/mt4.lua +++ b/test/functional/lua/miltertest/mt4.lua @@ -1,7 +1,7 @@ print('Check we will defer messages') -require './lib' -require './data' +dofile './lib.lua' +dofile './data.lua' setup() |