New test scripts
authorarjen <arjen>
Wed, 24 Dec 2003 07:33:56 +0000 (07:33 +0000)
committerarjen <arjen>
Wed, 24 Dec 2003 07:33:56 +0000 (07:33 +0000)
test/log0010 [new file with mode: 0644]
test/t0009.errors [new file with mode: 0644]
test/t0009.expect [new file with mode: 0644]
test/t0009.sh [new file with mode: 0644]
test/t0010.errors [new file with mode: 0644]
test/t0010.expect [new file with mode: 0644]
test/t0010.sh [new file with mode: 0644]
test/t0011.errors [new file with mode: 0644]
test/t0011.expect [new file with mode: 0644]
test/t0011.sh [new file with mode: 0644]

diff --git a/test/log0010 b/test/log0010
new file mode 100644 (file)
index 0000000..0cf45be
--- /dev/null
@@ -0,0 +1,75 @@
+Oct 26 06:50:22 schiza sendmail[16891]: h9Q5oL416891: from=root, size=25881, class=0, nrcpts=1, msgid=<200310260550.h9Q5oL416891@schiza.andromeda.nl>, relay=root@localhost
+Oct 26 06:50:37 schiza sendmail[16895]: h9Q5oL416891: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=00:00:16, xdelay=00:00:15, mailer=prog, pri=55881, dsn=2.0.0, stat=Sent
+Oct 26 06:55:29 schiza sendmail[16856]: h9Q5lQR16856: from=root, size=337, class=0, nrcpts=1, msgid=<200310260547.h9Q5lQR16856@schiza.andromeda.nl>, relay=root@localhost
+Oct 26 06:55:30 schiza sendmail[16856]: h9Q5lQR16856: to=arjen, ctladdr=root (0/0), delay=00:08:04, xdelay=00:00:01, mailer=local, pri=30337, dsn=2.0.0, stat=Sent
+Oct 26 07:00:24 schiza sendmail[17026]: h9Q60LH17026: from=root, size=498394, class=0, nrcpts=1, msgid=<200310260600.h9Q60LH17026@schiza.andromeda.nl>, relay=root@localhost
+Oct 26 07:00:56 schiza sendmail[17030]: h9Q60LH17026: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=00:00:35, xdelay=00:00:32, mailer=prog, pri=528394, dsn=2.0.0, stat=Sent
+Oct 26 07:01:07 schiza sendmail[17044]: h9Q616617044: from=<arjen@kithira.andromeda.nl>, size=3643, class=0, nrcpts=1, msgid=<200310260600.h9Q606A23769@kithira.andromeda.nl>, proto=ESMTP, daemon=MTA, relay=IDENT:qXX/lmuRjtVmvNB/J55iV6F/MsvZ4gkP@kithira.andromeda.nl [192.168.2.13]
+Oct 26 07:01:07 schiza sendmail[17045]: h9Q616617044: to=<arjen@schiza.andromeda.nl>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33171, dsn=2.0.0, stat=Sent
+Oct 26 07:10:21 schiza sendmail[17126]: h9Q6ALh17126: from=root, size=20990, class=0, nrcpts=1, msgid=<200310260610.h9Q6ALh17126@schiza.andromeda.nl>, relay=root@localhost
+Oct 26 07:10:22 schiza sendmail[17129]: h9Q6ALh17126: SYSERR(root): mailer prog died with signal 6
+Oct 26 07:10:22 schiza sendmail[17129]: h9Q6ALh17126: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=00:00:01, xdelay=00:00:01, mailer=prog, pri=50990, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 07:18:36 schiza sendmail[17200]: h9Q6IZ617200: from=<root@kithira.andromeda.nl>, size=33412, class=0, nrcpts=1, msgid=<200310260618.h9Q6I6v24231@kithira.andromeda.nl>, proto=ESMTP, daemon=MTA, relay=IDENT:ShnwUgRwXAIjI/4Jh+AhD2ZUAObUlyKL@kithira.andromeda.nl [192.168.2.13]
+Oct 26 07:18:36 schiza sendmail[17201]: h9Q6IZ617200: to=<arjen@schiza.andromeda.nl>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=62911, dsn=2.0.0, stat=Sent
+Oct 26 07:32:04 schiza sendmail[17321]: h9Q6ALh17126: SYSERR(root): mailer prog died with signal 6
+Oct 26 07:32:04 schiza sendmail[17321]: h9Q6ALh17126: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=00:21:43, xdelay=00:00:02, mailer=prog, pri=140990, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 07:32:07 schiza sendmail[17321]: h9ODHb618242: SYSERR(root): mailer prog died with signal 6
+Oct 26 07:32:07 schiza sendmail[17321]: h9ODHb618242: to="|gcm_input -v", ctladdr=<gnucomo@andromeda.nl> (8/0), delay=1+17:14:30, xdelay=00:00:03, mailer=prog, pri=3814934, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 07:32:16 schiza sendmail[17321]: h9NDSAk06913: to=<root@vd.wt.tno.nl>, delay=2+17:04:06, xdelay=00:00:09, mailer=esmtp, pri=6611008, relay=vd.wt.tno.nl. [192.87.96.29], dsn=4.0.0, stat=Deferred: vd.wt.tno.nl.: No route to host
+Oct 26 07:32:16 schiza sendmail[17321]: h9NDEZY02126: to=<root@vd.wt.tno.nl>, delay=2+17:17:41, xdelay=00:00:00, mailer=esmtp, pri=6629841, relay=vd.wt.tno.nl., dsn=4.0.0, stat=Deferred: vd.wt.tno.nl.: No route to host
+Oct 26 08:13:18 schiza sendmail[17682]: h9Q7DH617682: from=<marga@wmco.org>, size=10937, class=0, nrcpts=1, msgid=<6a92d8f1fa64bec8.73a76be035ee44ad@www1.euroclix.nl>, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=[212.123.224.220]
+Oct 26 08:13:18 schiza sendmail[17683]: h9Q7DH617682: to=<hayco@andromeda.nl>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=40425, dsn=2.0.0, stat=Sent
+Oct 26 08:26:46 schiza sendmail[17808]: h9Q7Qj617808: from=<squirrelmail-users-admin@lists.sourceforge.net>, size=3937, class=-60, nrcpts=1, msgid=<64501.213.190.44.96.1067150272.squirrel@internet.eik.lt>, proto=ESMTP, daemon=MTA, relay=lists.sourceforge.net [66.35.250.206]
+Oct 26 08:26:46 schiza sendmail[17809]: h9Q7Qj617808: to=<arjen@andromeda.nl>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=139267, dsn=2.0.0, stat=Sent
+Oct 26 08:32:05 schiza sendmail[17860]: h9Q6ALh17126: SYSERR(root): mailer prog died with signal 6
+Oct 26 08:32:05 schiza sendmail[17860]: h9Q6ALh17126: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=01:21:44, xdelay=00:00:03, mailer=prog, pri=230990, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 08:32:09 schiza sendmail[17860]: h9ODHb618242: SYSERR(root): mailer prog died with signal 6
+Oct 26 08:32:09 schiza sendmail[17860]: h9ODHb618242: to="|gcm_input -v", ctladdr=<gnucomo@andromeda.nl> (8/0), delay=1+18:14:32, xdelay=00:00:04, mailer=prog, pri=3904934, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 08:33:09 schiza sendmail[17860]: h9NDSAk06913: to=<root@vd.wt.tno.nl>, delay=2+18:04:59, xdelay=00:01:00, mailer=esmtp, pri=6701008, relay=vd.wt.tno.nl. [192.87.96.29], dsn=4.0.0, stat=Deferred: Connection timed out with vd.wt.tno.nl.
+Oct 26 08:33:09 schiza sendmail[17860]: h9NDEZY02126: to=<root@vd.wt.tno.nl>, delay=2+18:18:34, xdelay=00:00:00, mailer=esmtp, pri=6719841, relay=vd.wt.tno.nl., dsn=4.0.0, stat=Deferred: Connection timed out with vd.wt.tno.nl.
+Oct 26 09:32:04 schiza sendmail[18380]: h9Q6ALh17126: SYSERR(root): mailer prog died with signal 6
+Oct 26 09:32:04 schiza sendmail[18380]: h9Q6ALh17126: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=02:21:43, xdelay=00:00:02, mailer=prog, pri=320990, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 09:32:07 schiza sendmail[18380]: h9ODHb618242: SYSERR(root): mailer prog died with signal 6
+Oct 26 09:32:07 schiza sendmail[18380]: h9ODHb618242: to="|gcm_input -v", ctladdr=<gnucomo@andromeda.nl> (8/0), delay=1+19:14:30, xdelay=00:00:03, mailer=prog, pri=3994934, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 09:32:28 schiza sendmail[18380]: h9NDSAk06913: to=<root@vd.wt.tno.nl>, delay=2+19:04:18, xdelay=00:00:21, mailer=esmtp, pri=6791008, relay=vd.wt.tno.nl. [192.87.96.29], dsn=4.0.0, stat=Deferred: vd.wt.tno.nl.: No route to host
+Oct 26 09:32:28 schiza sendmail[18380]: h9NDEZY02126: to=<root@vd.wt.tno.nl>, delay=2+19:17:53, xdelay=00:00:00, mailer=esmtp, pri=6809841, relay=vd.wt.tno.nl., dsn=4.0.0, stat=Deferred: vd.wt.tno.nl.: No route to host
+Oct 26 10:02:00 schiza sendmail[18646]: h9Q920618646: from=<linux-request@nllgg.nl>, size=2010, class=-30, nrcpts=1, msgid=<200310260858.h9Q8wpb01941@patricia.nllgg.nl>, proto=ESMTP, daemon=MTA, relay=IDENT:root@mail.nllgg.nl [194.109.9.48]
+Oct 26 10:02:01 schiza sendmail[18647]: h9Q920618646: to=<arjen@andromeda.nl>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=84915, dsn=2.0.0, stat=Sent
+Oct 26 10:11:58 schiza sendmail[18734]: h9Q9Bv618734: from=<squirrelmail-users-admin@lists.sourceforge.net>, size=4041, class=-60, nrcpts=1, msgid=<000a01c39b9f$36ce9740$0a01a8c0@sourensxp>, proto=ESMTP, daemon=MTA, relay=lists.sourceforge.net [66.35.250.206]
+Oct 26 10:11:59 schiza sendmail[18735]: h9Q9Bv618734: to=<arjen@andromeda.nl>, delay=00:00:02, xdelay=00:00:01, mailer=local, pri=139170, dsn=2.0.0, stat=Sent
+Oct 26 10:12:20 schiza sendmail[18740]: h9Q9CK618740: from=<freddenboer@planet.nl>, size=1677, class=0, nrcpts=1, msgid=<000d01c39ba1$307a57b0$9600000a@p59a12ezxk82v1>, proto=ESMTP, daemon=MTA, relay=smtp02.wxs.nl [195.121.6.54]
+Oct 26 10:12:21 schiza sendmail[18741]: h9Q9CK618740: to=<hayco@andromeda.nl>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30894, dsn=2.0.0, stat=Sent
+Oct 26 10:28:33 schiza sendmail[18884]: h9Q9SX618884: ruleset=check_mail, arg1=<RANDYBARTHOLOW@YAHOO.COM>, relay=hnllhi1-ar1-4-65-063-046.hnllhi1.dsl-verizon.net [4.65.63.46], reject=550 5.0.0 <RANDYBARTHOLOW@YAHOO.COM>... Spam not accepted
+Oct 26 10:28:33 schiza sendmail[18884]: h9Q9SX618884: from=<RANDYBARTHOLOW@YAHOO.COM>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=hnllhi1-ar1-4-65-063-046.hnllhi1.dsl-verizon.net [4.65.63.46]
+Oct 26 10:32:04 schiza sendmail[18917]: h9Q6ALh17126: SYSERR(root): mailer prog died with signal 6
+Oct 26 10:32:04 schiza sendmail[18917]: h9Q6ALh17126: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=03:21:43, xdelay=00:00:02, mailer=prog, pri=410990, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 10:32:07 schiza sendmail[18917]: h9ODHb618242: SYSERR(root): mailer prog died with signal 6
+Oct 26 10:32:07 schiza sendmail[18917]: h9ODHb618242: to="|gcm_input -v", ctladdr=<gnucomo@andromeda.nl> (8/0), delay=1+20:14:30, xdelay=00:00:03, mailer=prog, pri=4084934, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 10:32:28 schiza sendmail[18917]: h9NDSAk06913: to=<root@vd.wt.tno.nl>, delay=2+20:04:18, xdelay=00:00:21, mailer=esmtp, pri=6881008, relay=vd.wt.tno.nl. [192.87.96.29], dsn=4.0.0, stat=Deferred: vd.wt.tno.nl.: No route to host
+Oct 26 10:32:28 schiza sendmail[18917]: h9NDEZY02126: to=<root@vd.wt.tno.nl>, delay=2+20:17:53, xdelay=00:00:00, mailer=esmtp, pri=6899841, relay=vd.wt.tno.nl., dsn=4.0.0, stat=Deferred: vd.wt.tno.nl.: No route to host
+Oct 26 11:04:29 schiza sendmail[19200]: h9QA4S619200: ruleset=check_mail, arg1=<239gqtzo@compuserve.com>, relay=dewinter.com [212.204.216.11], reject=550 5.0.0 <239gqtzo@compuserve.com>... Spam not accepted
+Oct 26 11:04:29 schiza sendmail[19200]: h9QA4S619200: from=<239gqtzo@compuserve.com>, size=2680, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=dewinter.com [212.204.216.11]
+Oct 26 11:27:41 schiza sendmail[19405]: h9QARd619405: from=<enigmail-bounces@mozdev.org>, size=8512, class=-30, nrcpts=1, msgid=<3F9BA140.2090707@jwsdot.com>, proto=SMTP, daemon=MTA, relay=mozdev.org [167.206.76.23]
+Oct 26 11:27:42 schiza sendmail[19406]: h9QARd619405: to=<arjen@andromeda.nl>, delay=00:00:02, xdelay=00:00:01, mailer=local, pri=90707, dsn=2.0.0, stat=Sent
+Oct 26 11:31:54 schiza sendmail[19449]: h9QAVs619449: from=<linux-request@nllgg.nl>, size=1837, class=-30, nrcpts=1, msgid=<200310261031.h9QAVtE25800@patricia.nllgg.nl>, proto=ESMTP, daemon=MTA, relay=IDENT:root@mail.nllgg.nl [194.109.9.48]
+Oct 26 11:31:55 schiza sendmail[19450]: h9QAVs619449: to=<arjen@andromeda.nl>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=84386, dsn=2.0.0, stat=Sent
+Oct 26 11:32:07 schiza sendmail[19454]: h9Q6ALh17126: SYSERR(root): mailer prog died with signal 6
+Oct 26 11:32:07 schiza sendmail[19454]: h9Q6ALh17126: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=04:21:46, xdelay=00:00:05, mailer=prog, pri=500990, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 11:32:07 schiza sendmail[19454]: h9Q6ALh17126: h9QAW2719454: sender notify: Warning: could not send message for past 4 hours
+Oct 26 11:32:07 schiza sendmail[19454]: h9QAW2719454: to=arjen, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=51051, dsn=2.0.0, stat=Sent
+Oct 26 11:32:12 schiza sendmail[19454]: h9ODHb618242: SYSERR(root): mailer prog died with signal 6
+Oct 26 11:32:12 schiza sendmail[19454]: h9ODHb618242: to="|gcm_input -v", ctladdr=<gnucomo@andromeda.nl> (8/0), delay=1+21:14:35, xdelay=00:00:04, mailer=prog, pri=4174934, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+Oct 26 11:33:12 schiza sendmail[19454]: h9NDSAk06913: to=<root@vd.wt.tno.nl>, delay=2+21:05:02, xdelay=00:01:00, mailer=esmtp, pri=6971008, relay=vd.wt.tno.nl. [192.87.96.29], dsn=4.0.0, stat=Deferred: Connection timed out with vd.wt.tno.nl.
+Oct 26 11:33:12 schiza sendmail[19454]: h9NDEZY02126: to=<root@vd.wt.tno.nl>, delay=2+21:18:37, xdelay=00:00:00, mailer=esmtp, pri=6989841, relay=vd.wt.tno.nl., dsn=4.0.0, stat=Deferred: Connection timed out with vd.wt.tno.nl.
+Oct 26 11:36:15 schiza sendmail[19496]: h9QAaE619496: from=<apache@ganesha.iaqi.com>, size=1390, class=0, nrcpts=1, msgid=<200310261038.h9QAc3QB004806@ganesha.iaqi.com>, proto=ESMTP, daemon=MTA, relay=[141.85.3.130]
+Oct 26 11:36:16 schiza sendmail[19497]: h9QAaE619496: to=<info@2fastcouriers.nl>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30835, dsn=2.0.0, stat=Sent
+Oct 26 11:49:44 schiza sendmail[19617]: h9QAni619617: from=<hayco@andromeda.nl>, size=553, class=0, nrcpts=1, msgid=<3F9BA6C8.9080401@andromeda.nl>, proto=ESMTP, daemon=MTA, relay=e133116.upc-e.chello.nl [213.93.133.116]
+Oct 26 11:49:50 schiza sendmail[19619]: h9QAni619617: to=<tdegraaf@cpl.nl>, ctladdr=<hayco@andromeda.nl> (112/35), delay=00:00:06, xdelay=00:00:06, mailer=esmtp, pri=30553, relay=mgw01.wxs.nl. [195.121.6.56], dsn=2.0.0, stat=Sent (h9QAnoLQ018405 Message accepted for delivery)
+Oct 26 12:00:41 schiza sendmail[19719]: h9QB0f619719: from=<arjen@kithira.andromeda.nl>, size=2782, class=0, nrcpts=1, msgid=<200310261100.h9QB02h28969@kithira.andromeda.nl>, proto=ESMTP, daemon=MTA, relay=IDENT:Ch80CIA+W9v1IyHfWHb7kZmMz7Zg5XgZ@kithira.andromeda.nl [192.168.2.13]
+Oct 26 12:00:42 schiza sendmail[19720]: h9QB0f619719: to=<arjen@schiza.andromeda.nl>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=32310, dsn=2.0.0, stat=Sent
+Oct 26 12:03:21 schiza sendmail[19746]: h9QB3L619746: ruleset=check_mail, arg1=<ajveqcgkt@aol.com>, relay=dewinter.com [212.204.216.11], reject=550 5.0.0 <ajveqcgkt@aol.com>... Spam not accepted
+Oct 26 12:03:21 schiza sendmail[19746]: h9QB3L619746: from=<ajveqcgkt@aol.com>, size=2170, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=dewinter.com [212.204.216.11]
+Oct 26 12:04:09 schiza sendmail[19756]: h9QB48619756: from=<linux-request@nllgg.nl>, size=1852, class=-30, nrcpts=1, msgid=<200310261104.h9QB48730482@patricia.nllgg.nl>, proto=ESMTP, daemon=MTA, relay=IDENT:root@mail.nllgg.nl [194.109.9.48]
+Oct 26 12:04:09 schiza sendmail[19757]: h9QB48619756: to=<arjen@andromeda.nl>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=84604, dsn=2.0.0, stat=Sent
+Nov  5 16:59:34 schiza sendmail[3684]: hA260K722119: to="|gcm_input -v", ctladdr=gnucomo (8/0), delay=3+09:59:14, xdelay=00:00:14, mailer=prog, pri=8040694, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL
+
diff --git a/test/t0009.errors b/test/t0009.errors
new file mode 100644 (file)
index 0000000..b435ab4
--- /dev/null
@@ -0,0 +1,14 @@
+psql:src/database/create.sql:559: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'object_statistics_pkey' for table 'object_statistics'
+psql:src/database/create.sql:595: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_pkey' for table 'parameter'
+psql:src/database/create.sql:615: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_class_pkey' for table 'parameter_class'
+psql:src/database/create.sql:629: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_notification_pkey' for table 'parameter_notification'
+psql:src/database/create.sql:660: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'property_pkey' for table 'property'
+psql:src/database/create.sql:798: ERROR:  CREATE GROUP: group name "view" already exists
+psql:src/database/create.sql:799: ERROR:  CREATE GROUP: group name "ops" already exists
+psql:src/database/create.sql:800: ERROR:  CREATE GROUP: group name "admin" already exists
+gcm_input WARNING: Not a valid line: nearly empty line
+gcm_input WARNING: Not a valid line: Jun  5 04:02:16 vd 
+psql:src/database/destroy.sql:67: ERROR:  table "object_system_user" does not exist
+psql:src/database/destroy.sql:92: ERROR:  sequence "unprocessed_l_unprocessedid_seq" does not exist
+psql:src/database/destroy.sql:94: ERROR:  table "unprocessed_log" does not exist
+psql:src/database/destroy.sql:96: ERROR:  table "user_gnucomo" does not exist
diff --git a/test/t0009.expect b/test/t0009.expect
new file mode 100644 (file)
index 0000000..8cf0997
--- /dev/null
@@ -0,0 +1,12 @@
+X-Powered-By: PHP/4.1.2\r
+Content-type: text/html\r
+\r
+Gathering statistics for object 1
+Gathering statistics for object 2
+
+ notificationid | objectid | type_of_issueid 
+----------------+----------+-----------------
+              1 |        2 |               5
+              2 |        1 |               5
+(2 rows)
+
diff --git a/test/t0009.sh b/test/t0009.sh
new file mode 100644 (file)
index 0000000..b13f9de
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+#
+#  Test the service check notifications.
+#  Create a database with two objects and no services. After reading two
+#  log file fragments for these two objects, gcm_daemon should create
+#  'service unknown' notifications, one for each object.
+#
+#  This tests problem report nr. 23
+
+LD_LIBRARY_PATH=/usr/local/pqxx/lib
+export LD_LIBRARY_PATH
+
+cd ..
+
+if psql gnucomo_test -f src/database/create.sql -q >/dev/null
+then
+   #  Prepare the database
+
+   psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
+   psql gnucomo_test -q -c "insert into object (objectname) values ('vd.wt.tno.nl')"
+   psql gnucomo_test -q -c "delete from service"
+
+   #  read logs for both objects
+
+   src/gcm_input/gcm_input -c gnucomo_test -h vd.wt.tno.nl -d 'sep 5 2002 20:30:45' <test/vd.messages
+   src/gcm_input/gcm_input -c gnucomo_test -h kithira.andromeda.nl -d 'sep 5 2002 20:30:45' <test/messages
+
+   # Make the notifications.
+   src/gcm_daemon/gcm_daemon.php -c gnucomo_test
+
+   # Check the notifications.
+
+   psql gnucomo_test -c "select notificationid,objectid,type_of_issueid from notification"
+
+   #  Clean up.
+
+   psql gnucomo_test -f src/database/destroy.sql -q
+
+   exit 0
+else
+   echo Can not create test database
+   exit 1
+fi
diff --git a/test/t0010.errors b/test/t0010.errors
new file mode 100644 (file)
index 0000000..8648c01
--- /dev/null
@@ -0,0 +1,12 @@
+psql:src/database/create.sql:559: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'object_statistics_pkey' for table 'object_statistics'
+psql:src/database/create.sql:595: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_pkey' for table 'parameter'
+psql:src/database/create.sql:615: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_class_pkey' for table 'parameter_class'
+psql:src/database/create.sql:629: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_notification_pkey' for table 'parameter_notification'
+psql:src/database/create.sql:660: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'property_pkey' for table 'property'
+psql:src/database/create.sql:798: ERROR:  CREATE GROUP: group name "view" already exists
+psql:src/database/create.sql:799: ERROR:  CREATE GROUP: group name "ops" already exists
+psql:src/database/create.sql:800: ERROR:  CREATE GROUP: group name "admin" already exists
+psql:src/database/destroy.sql:67: ERROR:  table "object_system_user" does not exist
+psql:src/database/destroy.sql:92: ERROR:  sequence "unprocessed_l_unprocessedid_seq" does not exist
+psql:src/database/destroy.sql:94: ERROR:  table "unprocessed_log" does not exist
+psql:src/database/destroy.sql:96: ERROR:  table "user_gnucomo" does not exist
diff --git a/test/t0010.expect b/test/t0010.expect
new file mode 100644 (file)
index 0000000..8a2ca3b
--- /dev/null
@@ -0,0 +1,10 @@
+X-Powered-By: PHP/4.1.2\r
+Content-type: text/html\r
+\r
+Gathering statistics for object 1
+
+ notificationid | objectid | type_of_issueid 
+----------------+----------+-----------------
+              1 |        1 |               6
+(1 row)
+
diff --git a/test/t0010.sh b/test/t0010.sh
new file mode 100644 (file)
index 0000000..a210f17
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+#
+#  Test the log processing of gcm_daemon
+#  Create a database with one object and read a piece of sendmail log
+#
+#  This tests problem report nr. 14
+
+LD_LIBRARY_PATH=/usr/local/pqxx/lib
+export LD_LIBRARY_PATH
+
+cd ..
+
+if psql gnucomo_test -f src/database/create.sql -q >/dev/null
+then
+   #  Prepare the database
+
+   psql gnucomo_test -q -c "insert into object (objectname) values ('schiza.andromeda.nl')"
+
+   #  read logs for both objects
+
+   src/gcm_input/gcm_input -c gnucomo_test -h schiza.andromeda.nl -d 'oct 26 2003 20:30:45' <test/log0010
+
+   # Test gcm_daemon
+   src/gcm_daemon/gcm_daemon.php -c gnucomo_test
+
+   # Check the notifications.
+
+   psql gnucomo_test -c "select notificationid,objectid,type_of_issueid from notification"
+
+   #  Clean up.
+
+   psql gnucomo_test -f src/database/destroy.sql -q
+
+   exit 0
+else
+   echo Can not create test database
+   exit 1
+fi
diff --git a/test/t0011.errors b/test/t0011.errors
new file mode 100644 (file)
index 0000000..8648c01
--- /dev/null
@@ -0,0 +1,12 @@
+psql:src/database/create.sql:559: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'object_statistics_pkey' for table 'object_statistics'
+psql:src/database/create.sql:595: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_pkey' for table 'parameter'
+psql:src/database/create.sql:615: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_class_pkey' for table 'parameter_class'
+psql:src/database/create.sql:629: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'parameter_notification_pkey' for table 'parameter_notification'
+psql:src/database/create.sql:660: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'property_pkey' for table 'property'
+psql:src/database/create.sql:798: ERROR:  CREATE GROUP: group name "view" already exists
+psql:src/database/create.sql:799: ERROR:  CREATE GROUP: group name "ops" already exists
+psql:src/database/create.sql:800: ERROR:  CREATE GROUP: group name "admin" already exists
+psql:src/database/destroy.sql:67: ERROR:  table "object_system_user" does not exist
+psql:src/database/destroy.sql:92: ERROR:  sequence "unprocessed_l_unprocessedid_seq" does not exist
+psql:src/database/destroy.sql:94: ERROR:  table "unprocessed_log" does not exist
+psql:src/database/destroy.sql:96: ERROR:  table "user_gnucomo" does not exist
diff --git a/test/t0011.expect b/test/t0011.expect
new file mode 100644 (file)
index 0000000..5894418
--- /dev/null
@@ -0,0 +1,24 @@
+ objectid |  objectname  | objectcode | scp_enabled | scp_inet | mail_enabled | mail_from | sms_enabled | sms_number | fax_enabled | fax_number | object_description | object_owner | physical_location | timezone | remark | os | os_version | log_count | notification_count | parameter_count 
+----------+--------------+------------+-------------+----------+--------------+-----------+-------------+------------+-------------+------------+--------------------+--------------+-------------------+----------+--------+----+------------+-----------+--------------------+-----------------
+        1 | vd.wt.tno.nl |            |             |          |              |           |             |            |             |            |                    |              |                   |          |        |    |            |           |                    |                
+(1 row)
+
+ logid | objectid | original_filename | servicecode |    object_timestamp    |       timestamp        |                                                                                       rawdata                                                                                        | processed | recognized 
+-------+----------+-------------------+-------------+------------------------+------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+------------
+     1 |        1 |                   | httpd       | 2003-11-09 04:03:07+01 | 2003-11-16 20:30:45+01 | 195.92.253.140 - - [09/Nov/2003:04:03:07 +0100] "GET /frame_left.html HTTP/1.1" 200 761 "-" "Mozilla/4.0 (compatible; grub-client-1.5.3; Crawl your own stuff with http://grub.org)" | f         | f
+     2 |        1 |                   | httpd       | 2003-11-09 05:40:48+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:05:40:48 +0100] "GET /delft-tyre/delivery.htm HTTP/1.0" 200 1392 "-" "Scooter/3.3"                                                                    | f         | f
+     3 |        1 |                   | httpd       | 2003-11-09 05:40:49+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:05:40:49 +0100] "GET /delft-tyre/frame_left.html HTTP/1.0" 200 1679 "-" "Scooter/3.3"                                                                 | f         | f
+     4 |        1 |                   | httpd       | 2003-11-09 05:40:50+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:05:40:50 +0100] "GET /delft-tyre/delivery_body.html HTTP/1.0" 200 16467 "-" "Scooter/3.3"                                                             | f         | f
+     5 |        1 |                   | httpd       | 2003-11-09 05:40:50+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:05:40:50 +0100] "GET /delft-tyre/delivery.htm HTTP/1.0" 200 1392 "-" "Scooter/3.3"                                                                    | f         | f
+     6 |        1 |                   | httpd       | 2003-11-09 05:58:31+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:05:58:31 +0100] "GET /delft-tyre/consultancy_body.html HTTP/1.0" 200 5009 "-" "Scooter/3.3"                                                           | f         | f
+     7 |        1 |                   | httpd       | 2003-11-09 06:17:11+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:06:17:11 +0100] "GET /delft-tyre/ttd1.htm HTTP/1.0" 200 1378 "-" "Scooter/3.3"                                                                        | f         | f
+     8 |        1 |                   | httpd       | 2003-11-09 06:17:11+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:06:17:11 +0100] "GET /delft-tyre/frame_left.html HTTP/1.0" 200 1679 "-" "Scooter/3.3"                                                                 | f         | f
+     9 |        1 |                   | httpd       | 2003-11-09 06:17:12+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:06:17:12 +0100] "GET /delft-tyre/ttd1_body.html HTTP/1.0" 200 1541 "-" "Scooter/3.3"                                                                  | f         | f
+    10 |        1 |                   | httpd       | 2003-11-09 06:17:12+01 | 2003-11-16 20:30:45+01 | 216.39.48.173 - - [09/Nov/2003:06:17:12 +0100] "GET /delft-tyre/ttd1.htm HTTP/1.0" 200 1378 "-" "Scooter/3.3"                                                                        | f         | f
+    11 |        1 |                   | httpd       | 2003-11-09 06:19:58+01 | 2003-11-16 20:30:45+01 | 195.92.95.18 - - [09/Nov/2003:06:19:58 +0100] "HEAD / HTTP/1.0" 200 0 "-" "-"                                                                                                        | f         | f
+(11 rows)
+
+ paramid | objectid | name | class | description 
+---------+----------+------+-------+-------------
+(0 rows)
+
diff --git a/test/t0011.sh b/test/t0011.sh
new file mode 100644 (file)
index 0000000..1257d72
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+#
+#  Create an object 'vd.wt.tno.nl' in the database and
+#  parse a piece of a apache access file which may be mistaken for an rpm list
+#
+
+LD_LIBRARY_PATH=/usr/local/pqxx/lib
+export LD_LIBRARY_PATH
+
+cd ..
+
+if psql gnucomo_test -f src/database/create.sql -q >/dev/null
+then
+   psql gnucomo_test -q -c "insert into object (objectname) values ('vd.wt.tno.nl')"
+   psql gnucomo_test -c "select * from object"
+   src/gcm_input/gcm_input -c gnucomo_test -h vd.wt.tno.nl -d 'nov 16 2003 20:30:45' <test/access_log
+   psql gnucomo_test -c "select * from log"
+   psql gnucomo_test -c "select * from parameter"
+   psql gnucomo_test -q -f src/database/destroy.sql
+   exit $result
+else
+   echo Can not create test database
+   exit 1
+fi