4 # Test the service and log check notifications.
5 # Create a database with two objects and no services. After reading two
6 # log file fragments for these two objects, gcm_daemon should create
7 # several notifications, three for each object.
9 # This tests problem report nr. 23
11 LD_LIBRARY_PATH=/usr/local/pqxx/lib
12 export LD_LIBRARY_PATH
16 if psql gnucomo_test -q <src/database/create.sql >/dev/null
18 # Prepare the database
20 psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
21 psql gnucomo_test -q -c "insert into object (objectname) values ('vd.wt.tno.nl')"
22 psql gnucomo_test -q -c "delete from service"
24 # read logs for both objects
26 src/gcm_input/gcm_input -c gnucomo_test -h vd.wt.tno.nl -d 'sep 5 2002 20:30:45' <test/vd.messages
27 src/gcm_input/gcm_input -c gnucomo_test -h kithira.andromeda.nl -d 'sep 5 2002 20:30:45' <test/messages
29 # Make the notifications.
30 src/gcm_daemon/gcm_daemon.php -c gnucomo_test
32 # Check the notifications.
34 psql gnucomo_test -c "select notificationid,objectid,type_of_issueid from notification"
38 psql gnucomo_test -f src/database/destroy.sql -q
42 echo Can not create test database