Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions tests/p_sendmail/20_sendmail_mta.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Author: Christoph Galuschka <christoph.galuschka@chello.at>

t_Log "Running $0 - sendmail can accept and deliver local email."
Expand All @@ -7,16 +7,16 @@ if [ "$CONTAINERTEST" -eq "1" ]; then
exit 0
fi
ret_val=1
DELIVERED=1

# send mail to localhost
mail=$(echo -e "helo localhost\nmail from: root@localhost\nrcpt to: root@localhost\ndata\nt_functional test\n.\nquit\n" | nc -w 5 127.0.0.1 25 | grep accepted)
MTA_ACCEPT=$?
if [ $MTA_ACCEPT == 0 ]
if [ $MTA_ACCEPT = 0 ]
then
t_Log 'Mail has been queued successfully'
fi

sleep 1

if [ "$centos_ver" -eq "8" ]; then
t_Log "Dumping journalctl to /var/log/maillog"
Expand All @@ -25,11 +25,18 @@ fi
regex='250\ 2\.0\.0\ ([0-9A-Za-z]*)\ Message\ accepted\ for\ delivery'
if [[ $mail =~ $regex ]]
then
egrep -q "${BASH_REMATCH[1]}\:.*stat\=Sent" /var/log/maillog
DELIVERED=$?
for i in $(seq 1 60); do
egrep -q "${BASH_REMATCH[1]}\:.*stat\=Sent" /var/log/maillog
DELIVERED=$?
if [ "$DELIVERED" -ne 0 ];then
sleep 1
else
break;
fi
done
fi

if ([ $MTA_ACCEPT == 0 ] && [ $DELIVERED == 0 ])
if [ $MTA_ACCEPT = 0 ] && [ $DELIVERED = 0 ]
then
ret_val=0
t_Log 'Mail has been delivered and removed from queue.'
Expand Down
11 changes: 8 additions & 3 deletions tests/p_squid/squid_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@

t_Log "Running $0 - Squid test."

if [ $SKIP_QA_HARNESS -eq 1 ]; then
URL="http://mirror.centos.org/"
CHECK_FOR="timestamp"
if [ -z "$SKIP_QA_HARNESS" ];then
SKIP_QA_HARNESS=1
fi

if [ "$SKIP_QA_HARNESS" -eq 1 ]; then
URL="http://www.centos.org/"
#CHECK_FOR="timestamp" # Before 2024-12-13: https://web.archive.org/web/20241212132650/https://www.centos.org/ - RDA - 250109
CHECK_FOR="CentOS Project" # After 2024-12-13 : https://web.archive.org/web/20241213163833/https://www.centos.org/ - RDA - 250109
else
URL="http://repo.centos.qa/qa/"
CHECK_FOR="ks_cfg"
Expand Down
Loading