da7aa3fee9b38004aa04727105fddc765d364e98
[gnucomo.git] / test / t0005.sh
1 #!/bin/sh
2
3 #
4 #  Create an object 'kithira.andromeda.nl' in the database and
5 #  parse a piece of a syslog file without specifying a time.
6 #  This tests wether an improper time still creates valid data.
7
8 cd ..
9
10 if psql gnucomo_test -f src/database/create.sql -q >/dev/null
11 then
12    psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
13    psql gnucomo_test -c "select * from object"
14    src/gcm_input/gcm_input -c gnucomo_test -h kithira.andromeda.nl -d 'sep 5 2002' <test/messages
15    psql gnucomo_test -c "select * from log"
16    psql gnucomo_test -f src/database/destroy.sql -q
17    exit $result
18 else
19    echo Can not create test database
20    exit 1
21 fi