Initial revision of test scripts
[gnucomo.git] / test / t0002a.sh
index 7ccb431..fc5cef1 100644 (file)
@@ -1,9 +1,19 @@
 #!/bin/sh
 
+#
+#  Create an object 'kithira.andromeda.nl' in the database and
+#  parse a piece of a syslog file.
+#  This tests normal operation in which gcm_input reads a syslog file
+#  directly.
+
+cd ..
+
 if psql gnucomo_test -f src/create.sql
 then
-   psql gnucomo_test -c 'select statuscode from status'
-   result=$?
+   psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
+   psql gnucomo_test -c "select * from object"
+   src/gcm_input -c gnucomo_test -h kithira.andromeda.nl -d 'sep 5 2002 20:30:45' <test/messages
+   psql gnucomo_test -c "select * from log"
    psql gnucomo_test -f src/destroy.sql
    exit $result
 else