Removed line numbers from the SQL scripts output.
[gnucomo.git] / test / t0010.sh
1 #!/bin/sh
2
3 #
4 #  Test the log processing of gcm_daemon
5 #  Create a database with one object and read a piece of sendmail log
6 #
7 #  This tests problem report nrs. 14 through 17
8
9 LD_LIBRARY_PATH=/usr/local/pqxx/lib
10 export LD_LIBRARY_PATH
11
12 cd ..
13
14 if psql gnucomo_test -q <src/database/create.sql >/dev/null
15 then
16    #  Prepare the database
17
18    psql gnucomo_test -q -c "insert into object (objectname) values ('schiza.andromeda.nl')"
19
20    #  read logs for both objects
21
22    src/gcm_input/gcm_input -c gnucomo_test -h schiza.andromeda.nl -d 'oct 26 2003 20:30:45' <test/log0010
23
24    # Test gcm_daemon
25    src/gcm_daemon/gcm_daemon.php -c gnucomo_test
26
27    # Check the notifications.
28
29    psql gnucomo_test -c "select notificationid,objectid,type_of_issueid from notification"
30
31    #  Clean up.
32
33    psql gnucomo_test -f src/database/destroy.sql -q
34
35    exit 0
36 else
37    echo Can not create test database
38    exit 1
39 fi