Blame tests/p_mailman/mailman_test.sh

Athmane Madjoudj 3baa2c
#!/bin/sh
Athmane Madjoudj 3baa2c
# Author: Athmane Madjoudj <athmanem@gmail.com>
Athmane Madjoudj 3baa2c
40b4c8
if [ "$CONTAINERTEST" -eq "1" ]; then
40b4c8
    t_Log "Running in container -> SKIP"
40b4c8
    exit 0
40b4c8
fi
40b4c8
f49232
if (t_GetPkgRel basesystem | grep -q el9)
f49232
then
f49232
  t_Log "This is a C9 system. mailman not present. Skipping."
f49232
  t_CheckExitStatus 0
f49232
  exit $PASS
f49232
fi
f49232
Athmane Madjoudj 3baa2c
t_Log "Running $0 - mailman test."
Athmane Madjoudj 3baa2c
Athmane Madjoudj 3baa2c
# Add mailman list
Athmane Madjoudj 3baa2c
/usr/lib/mailman/bin/newlist -q mailman root@localhost.localdomain password > /dev/null 2>&1
Athmane Madjoudj 3baa2c
Athmane Madjoudj 3baa2c
# Restart httpd (started in other tests) and start mailman 
Karanbir Singh 90a10d
t_ServiceControl httpd restart
Karanbir Singh 90a10d
t_ServiceControl mailman start
Athmane Madjoudj 3baa2c
Athmane Madjoudj 3baa2c
curl -s http://localhost/mailman/listinfo | grep -q 'localhost Mailing Lists'
Athmane Madjoudj 3baa2c
t_CheckExitStatus $?
Karanbir Singh 90a10d
Karanbir Singh 90a10d
t_ServiceControl httpd stop
Karanbir Singh 90a10d
t_ServiceControl mailman stop