diff options
author | Marko Kreen | 2007-12-07 15:02:48 +0000 |
---|---|---|
committer | Marko Kreen | 2007-12-07 15:02:48 +0000 |
commit | 7cab19050ee929584d07845b7e8a4e0111629a7f (patch) | |
tree | e376906ec548dc865c3ad8132c6fe41c1e4be3b4 | |
parent | c5a0f220aa74357d55239aeb7565588a2dc930ee (diff) |
more test work
-rw-r--r-- | tests/setadm/conf/admin.ini (renamed from tests/setadm/master.ini) | 0 | ||||
-rw-r--r-- | tests/setadm/conf/ticker_zbranch.ini | 10 | ||||
-rw-r--r-- | tests/setadm/conf/ticker_zleaf.ini | 10 | ||||
-rw-r--r-- | tests/setadm/conf/ticker_zroot.ini | 10 | ||||
-rw-r--r-- | tests/setadm/conf/zbranch.ini | 8 | ||||
-rw-r--r-- | tests/setadm/conf/zleaf.ini | 8 | ||||
-rw-r--r-- | tests/setadm/conf/zroot.ini | 7 | ||||
-rwxr-xr-x | tests/setadm/gendb.sh | 10 | ||||
-rwxr-xr-x | tests/setadm/stop.sh | 13 | ||||
-rw-r--r-- | tests/setadm/test.ini | 4 | ||||
-rwxr-xr-x | tests/setadm/testconsumer.py | 11 |
11 files changed, 84 insertions, 7 deletions
diff --git a/tests/setadm/master.ini b/tests/setadm/conf/admin.ini index ed045108..ed045108 100644 --- a/tests/setadm/master.ini +++ b/tests/setadm/conf/admin.ini diff --git a/tests/setadm/conf/ticker_zbranch.ini b/tests/setadm/conf/ticker_zbranch.ini new file mode 100644 index 00000000..7bf1746b --- /dev/null +++ b/tests/setadm/conf/ticker_zbranch.ini @@ -0,0 +1,10 @@ +[pgqadm] + +job_name = pgqadm_zbranch + +db = dbname=zset_branch + +logfile = sys/log.%(job_name)s +pidfile = sys/pid.%(job_name)s + + diff --git a/tests/setadm/conf/ticker_zleaf.ini b/tests/setadm/conf/ticker_zleaf.ini new file mode 100644 index 00000000..0f768acf --- /dev/null +++ b/tests/setadm/conf/ticker_zleaf.ini @@ -0,0 +1,10 @@ +[pgqadm] + +job_name = pgqadm_zleaf + +db = dbname=zset_leaf + +logfile = sys/log.%(job_name)s +pidfile = sys/pid.%(job_name)s + + diff --git a/tests/setadm/conf/ticker_zroot.ini b/tests/setadm/conf/ticker_zroot.ini new file mode 100644 index 00000000..5e87bde5 --- /dev/null +++ b/tests/setadm/conf/ticker_zroot.ini @@ -0,0 +1,10 @@ +[pgqadm] + +job_name = pgqadm_zroot + +db = dbname=zset_root + +logfile = sys/log.%(job_name)s +pidfile = sys/pid.%(job_name)s + + diff --git a/tests/setadm/conf/zbranch.ini b/tests/setadm/conf/zbranch.ini new file mode 100644 index 00000000..c27f23e6 --- /dev/null +++ b/tests/setadm/conf/zbranch.ini @@ -0,0 +1,8 @@ +[test_consumer] +set_name = zset +subscriber_db = dbname=zset_branch + +job_name = branch_consumer +logfile = sys/log.%(job_name)s +pidfile = sys/pid.%(job_name)s + diff --git a/tests/setadm/conf/zleaf.ini b/tests/setadm/conf/zleaf.ini new file mode 100644 index 00000000..55dad167 --- /dev/null +++ b/tests/setadm/conf/zleaf.ini @@ -0,0 +1,8 @@ +[test_consumer] +set_name = zset +subscriber_db = dbname=zset_leaf + +job_name = leaf_consumer +logfile = sys/log.%(job_name)s +pidfile = sys/pid.%(job_name)s + diff --git a/tests/setadm/conf/zroot.ini b/tests/setadm/conf/zroot.ini new file mode 100644 index 00000000..d3435170 --- /dev/null +++ b/tests/setadm/conf/zroot.ini @@ -0,0 +1,7 @@ +[test_consumer] +set_name = zset +subscriber_db = dbname=zset_root +job_name = root_consumer +logfile = sys/log.%(job_name)s +pidfile = sys/pid.%(job_name)s + diff --git a/tests/setadm/gendb.sh b/tests/setadm/gendb.sh index 168e3261..59917bdf 100755 --- a/tests/setadm/gendb.sh +++ b/tests/setadm/gendb.sh @@ -1,6 +1,7 @@ #! /bin/sh . ../env.sh +./stop.sh dropdb zset_root dropdb zset_branch @@ -9,8 +10,11 @@ createdb zset_root createdb zset_branch createdb zset_leaf -setadm.py master.ini init-root z-root "dbname=zset_root" -setadm.py master.ini init-branch z-branch "dbname=zset_branch" --provider=z-root -setadm.py master.ini init-leaf z-leaf "dbname=zset_leaf" --provider=z-branch +setadm.py conf/admin.ini init-root z-root "dbname=zset_root" +setadm.py conf/admin.ini init-branch z-branch "dbname=zset_branch" --provider=z-root +setadm.py conf/admin.ini init-leaf z-leaf "dbname=zset_leaf" --provider=z-branch +./testconsumer.py -v -d conf/zroot.ini +./testconsumer.py -v -d conf/zbranch.ini +./testconsumer.py -v -d conf/zleaf.ini diff --git a/tests/setadm/stop.sh b/tests/setadm/stop.sh new file mode 100755 index 00000000..12295f86 --- /dev/null +++ b/tests/setadm/stop.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../env.sh + +./testconsumer.py -s conf/zroot.ini +./testconsumer.py -s conf/zbranch.ini +./testconsumer.py -s conf/zleaf.ini + +#sleep 1 + +#pgqadm.py -s conf/ticker.ini +#pgqadm.py -s conf/linkticker.ini + diff --git a/tests/setadm/test.ini b/tests/setadm/test.ini deleted file mode 100644 index a976160f..00000000 --- a/tests/setadm/test.ini +++ /dev/null @@ -1,4 +0,0 @@ -[setconsumer] -set_name = aset -subscriber_db = dbname=settest - diff --git a/tests/setadm/testconsumer.py b/tests/setadm/testconsumer.py new file mode 100755 index 00000000..bce25a31 --- /dev/null +++ b/tests/setadm/testconsumer.py @@ -0,0 +1,11 @@ +#! /usr/bin/env python + +import sys, pgq + +class TestConsumer(pgq.SetConsumer): + pass + +if __name__ == '__main__': + script = TestConsumer('test_consumer', sys.argv[1:]) + script.start() + |