Commit b360794d authored by Paul Cammish's avatar Paul Cammish
Browse files

Update mail/sympl/test.d/tc_exim4.rb, ftp/test.d/tc_ftp.rb

parent eb5c3c08
......@@ -19,14 +19,14 @@ class TestFTP < Test::Unit::TestCase
@domain.create()
# Hack to disable TLS enforcement, as the ruby lib doesnt support it
system 'echo 1 > /etc/pure-ftpd/conf/TLS ; sleep 3 ; service pure-ftpd restart ; sleep 3'
system 'echo 1 > /etc/pure-ftpd/conf/TLS ; sync ; service pure-ftpd restart ; sleep 3'
end
def teardown
# Re-enable TLS enforcement
system 'echo 2 > /etc/pure-ftpd/conf/TLS ; sleep 3 ; service pure-ftpd restart ; sleep 3'
system 'echo 2 > /etc/pure-ftpd/conf/TLS ; sync ; service pure-ftpd restart ; sleep 3'
#
# Delete the temporary domain
......
......@@ -408,7 +408,7 @@ class Exim4ConfigTest < Test::Unit::TestCase
FileUtils.touch(File.join(config_dir, "antivirus"))
# Fairly hacky way to ensure clamAV is up and running - stopping it, starting it and waiting for it to say it's loaded sigs
# deals with an annoying race condition under load testing, where it hasnt finished reading sigs before the tests get to it
system('sync ; date=$(date "+%Y-%m-%d %H:%M") ; systemctl reload clamav-daemon.service ; timeout 120 journalctl -u clamav-daemon.service --since="$date" --follow | while read line ; do echo $line ; if [ $( echo $line | grep -c "[0-9]* signatures" ) -eq 1 ]; then killall "journalctl" ; fi ; done ; sleep 1')
system('sync ; date=$(date "+%Y-%m-%d %H:%M") ; systemctl reload clamav-daemon.service ; timeout 120 journalctl -u clamav-daemon.service --since="$date" --follow | while read line ; do if [ $( echo $line | grep -c "[0-9]* signatures" ) -eq 1 ]; then killall "journalctl" ; fi ; done ; sleep 1')
# OK the file is there now, so reject (as per default)
do_acl_script('exim4_acl_tests/antivirus_reject')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment