4 # Test the log processing of gcm_daemon
5 # Create a database with one object and read a piece of sendmail log
7 # This tests problem report nrs. 14 through 17
15 if psql gnucomo_test -q <../src/database/create.sql >/dev/null
17 # Prepare the database
19 psql gnucomo_test -q -c "insert into object (objectname) values ('schiza.andromeda.nl')"
21 # read logs for both objects
23 ../src/gcm_input/gcm_input -c gnucomo_test -h schiza.andromeda.nl -d 'oct 26 2003 20:30:45' <log0010
26 cd ../src/gcm_daemon; ./gcm_daemon.php -c gnucomo_test; cd ../../test
28 # Check the notifications.
30 NR_NOTIF1=`psql gnucomo_test -q -t -c "select count(*) from notification"`
31 if [[ $NR_NOTIF1 -ne 4 ]]
33 echo "$NR_NOTIF1 notifications for object 1 (4 expected)."
39 psql gnucomo_test -f ../src/database/destroy.sql -q
44 echo Can not create test database