]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: use lua mailer script for mailers tests
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 3 May 2023 14:55:52 +0000 (16:55 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 May 2023 14:28:32 +0000 (16:28 +0200)
Since mailers/healthcheckmail.vtc already requires lua to emulate the
SMTP server for the test, force it to use lua mailers example script
to send email-alerts so we don't rely anymore on legacy tcpcheck
mailers implementation.

This is done by simply loading examples/mailers.lua (as a symlink) from
haproxy config file.

reg-tests/mailers/healthcheckmail.vtc
reg-tests/mailers/mailers.lua [new symlink]

index 821250fc8334a03d2a352d4f029737c30a4f31ed..208d350f6fd28964cb6823812585fc1c3cbcdacc 100644 (file)
@@ -12,6 +12,7 @@ syslog S1 -level notice {
 
 haproxy h1 -conf {
     global
+        lua-load ${testdir}/mailers.lua
         lua-load ${testdir}/healthcheckmail.lua
 
     defaults
diff --git a/reg-tests/mailers/mailers.lua b/reg-tests/mailers/mailers.lua
new file mode 120000 (symlink)
index 0000000..5ea4673
--- /dev/null
@@ -0,0 +1 @@
+../../examples/lua/mailers.lua
\ No newline at end of file