summaryrefslogtreecommitdiffstats
path: root/postgresql-tests/tasks/initdb
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-22 08:54:05 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-10-22 08:54:05 +0200
commit2422a081a5be0d5ac5afb122361bc283da67341f (patch)
treecb255582060af6547dd9318c56ba0e8c761846a1 /postgresql-tests/tasks/initdb
parent922089746e1029de9be986672fcdeb6bc82e18d7 (diff)
downloadpostgresql-setup-tests-2422a081a5be0d5ac5afb122361bc283da67341f.tar.gz
postgresql-setup-tests-2422a081a5be0d5ac5afb122361bc283da67341f.tar.xz
postgresql-setup-tests-2422a081a5be0d5ac5afb122361bc283da67341f.zip
big reorg: prepare for generalization
Try to split into three separate components -> controller, tester, and 'tasks' (postgresql-tasks in our case). The controller component is the main part which is able to run the task remotely. Tester is more-like library for 'tasks' component (should be reusable on the raw git level). * controller: Almost separated component. * postgresql-tasks: Likewise. * tester: Likewise.
Diffstat (limited to 'postgresql-tests/tasks/initdb')
-rw-r--r--postgresql-tests/tasks/initdb/config.sh4
-rwxr-xr-xpostgresql-tests/tasks/initdb/runtest.sh11
2 files changed, 15 insertions, 0 deletions
diff --git a/postgresql-tests/tasks/initdb/config.sh b/postgresql-tests/tasks/initdb/config.sh
new file mode 100644
index 0000000..c7f6619
--- /dev/null
+++ b/postgresql-tests/tasks/initdb/config.sh
@@ -0,0 +1,4 @@
+DTF_TEST_ID="initdb-basic"
+DTF_TEST_DESCRIPTION="\
+Check that the syntax 'postgresql-setup --initdb' works together with following
+'service start postgresql'."
diff --git a/postgresql-tests/tasks/initdb/runtest.sh b/postgresql-tests/tasks/initdb/runtest.sh
new file mode 100755
index 0000000..ee520d6
--- /dev/null
+++ b/postgresql-tests/tasks/initdb/runtest.sh
@@ -0,0 +1,11 @@
+dtf_postgresql_test_init
+if rlIsFedora 18 19 20 21 || rlIsRHEL 5 6 7; then
+ # This syntaxe is not supported on oler systems.
+ :
+else
+ rlRun "postgresql-setup --initdb"
+ rlServiceStart postgresql
+ dtf_postgresql_check_started
+fi
+
+dtf_postgresql_test_finish