4 # Create an object 'kithira.andromeda.nl' in the database and
5 # try to parse a piece of a syslog file without specifying the hostname.
6 # The message should be rejected on account of an unknown host.
13 if psql gnucomo_test -q <../src/database/create.sql >/dev/null
15 psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
16 ../src/gcm_input/gcm_input -c gnucomo_test <messages
17 NR_LOGS=`psql gnucomo_test -q -t -c "select count(*) from log"`
18 if [[ $NR_LOGS -eq 0 ]]
20 echo "No log entries in database"
23 if [[ $result -eq 0 ]]
25 GCM_LOG=`cat gcm_input.log`
27 if [[ $GCM_LOG != "Can not determine the hostname where the message came from." ]]
32 psql gnucomo_test -f ../src/database/destroy.sql -q
36 echo Can not create test database