Fixed pgbench tests
diff --git a/koder.yaml b/koder.yaml
index 9868670..404e1e9 100644
--- a/koder.yaml
+++ b/koder.yaml
@@ -1,8 +1,3 @@
-clouds:
-    ceph: local
-
-discover: ceph
-
 explicit_nodes:
     "ssh://192.168.152.43": testnode
 
@@ -17,7 +12,9 @@
         cfg: tests/io_task_test.cfg
         params:
             SOME_OPT: 12
+    - pgbench:
+         num_clients: "4,8,12"
+         transactions_per_client: "1,2,3"
 
 logging:
     extra_logs: 1
-
diff --git a/tests/itest.py b/tests/itest.py
index e7fd3eb..61c4124 100644
--- a/tests/itest.py
+++ b/tests/itest.py
@@ -27,7 +27,7 @@
 
 
 class TwoScriptTest(IPerfTest):
-    def __init__(self, opts, testtool, on_result_cb, keep_tmp_files):
+    def __init__(self, opts, on_result_cb):
         super(TwoScriptTest, self).__init__(on_result_cb)
         self.opts = opts
         self.pre_run_script = None
@@ -59,7 +59,9 @@
 
     def run(self, conn, barrier):
         remote_script = self.copy_script(conn, self.run_script)
-        cmd = remote_script + ' ' + ' '.join(self.opts)
+        cmd_opts = ' '.join(["%s %s" % (key, val) for key, val
+                             in self.opts.items()])
+        cmd = remote_script + ' ' + cmd_opts
         code, out_err = run_over_ssh(conn, cmd)
         self.on_result(code, out_err, cmd)
 
@@ -84,10 +86,10 @@
 class PgBenchTest(TwoScriptTest):
 
     def set_run_script(self):
-        self.pre_run_script = "hl_tests/postgres/prepare.sh"
+        self.pre_run_script = "tests/postgres/prepare.sh"
 
     def set_pre_run_script(self):
-        self.run_script = "hl_tests/postgres/run.sh"
+        self.run_script = "tests/postgres/run.sh"
 
 
 class IOPerfTest(IPerfTest):
diff --git a/tests/postgres/run.sh b/tests/postgres/run.sh
index b71a082..daad499 100755
--- a/tests/postgres/run.sh
+++ b/tests/postgres/run.sh
@@ -1,12 +1,33 @@
 #!/bin/bash
 set -e
 
-CLIENTS=$(echo $1 | tr ',' '\n')
-TRANSACTINOS_PER_CLIENT=$(echo $2 | tr ',' '\n')
+while [[ $# > 1 ]]
+do
+key="$1"
+
+case $key in
+    num_clients)
+    CLIENTS="$2"
+    shift
+    ;;
+    transactions_per_client)
+    TRANSACTINOS_PER_CLIENT="$2"
+    shift
+    ;;
+    *)
+    echo "Unknown option $key"
+    exit 1
+    ;;
+esac
+shift
+done
+
+CLIENTS=$(echo $CLIENTS | tr ',' '\n')
+TRANSACTINOS_PER_CLIENT=$(echo $TRANSACTINOS_PER_CLIENT | tr ',' '\n')
 
 
-sudo -u postgres createdb -O postgres pgbench
-sudo -u postgres pgbench -i -U postgres pgbench
+sudo -u postgres createdb -O postgres pgbench &> /dev/null
+sudo -u postgres pgbench -i -U postgres pgbench &> /dev/null
 
 
 for num_clients in $CLIENTS; do
@@ -20,7 +41,7 @@
     done
 done
 
-sudo -u postgres dropdb pgbench
+sudo -u postgres dropdb pgbench &> /dev/null
 
 exit 0