more test work
authorMarko Kreen <markokr@gmail.com>
Fri, 7 Dec 2007 15:02:48 +0000 (15:02 +0000)
committerMarko Kreen <markokr@gmail.com>
Fri, 7 Dec 2007 15:02:48 +0000 (15:02 +0000)
tests/setadm/conf/admin.ini [moved from tests/setadm/master.ini with 100% similarity]
tests/setadm/conf/ticker_zbranch.ini [new file with mode: 0644]
tests/setadm/conf/ticker_zleaf.ini [new file with mode: 0644]
tests/setadm/conf/ticker_zroot.ini [new file with mode: 0644]
tests/setadm/conf/zbranch.ini [new file with mode: 0644]
tests/setadm/conf/zleaf.ini [new file with mode: 0644]
tests/setadm/conf/zroot.ini [new file with mode: 0644]
tests/setadm/gendb.sh
tests/setadm/stop.sh [new file with mode: 0755]
tests/setadm/test.ini [deleted file]
tests/setadm/testconsumer.py [new file with mode: 0755]

diff --git a/tests/setadm/conf/ticker_zbranch.ini b/tests/setadm/conf/ticker_zbranch.ini
new file mode 100644 (file)
index 0000000..7bf1746
--- /dev/null
@@ -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 (file)
index 0000000..0f768ac
--- /dev/null
@@ -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 (file)
index 0000000..5e87bde
--- /dev/null
@@ -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 (file)
index 0000000..c27f23e
--- /dev/null
@@ -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 (file)
index 0000000..55dad16
--- /dev/null
@@ -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 (file)
index 0000000..d343517
--- /dev/null
@@ -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
+
index 168e3261294de8809fe1f9dfdf9bc18b3ae26d06..59917bdfeafdb60a371f0f074cb0d359b653a679 100755 (executable)
@@ -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 (executable)
index 0000000..12295f8
--- /dev/null
@@ -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 (file)
index a976160..0000000
+++ /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 (executable)
index 0000000..bce25a3
--- /dev/null
@@ -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()
+