summaryrefslogtreecommitdiffstats
path: root/postgresql-tests/gen-data/tasks
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/gen-data/tasks
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/gen-data/tasks')
-rw-r--r--postgresql-tests/gen-data/tasks/basic/run.sh6
-rw-r--r--postgresql-tests/gen-data/tasks/locale-cz/run.sh5
-rw-r--r--postgresql-tests/gen-data/tasks/locale-utf-typo/run.sh5
-rw-r--r--postgresql-tests/gen-data/tasks/templates/locale-change.sh16
4 files changed, 32 insertions, 0 deletions
diff --git a/postgresql-tests/gen-data/tasks/basic/run.sh b/postgresql-tests/gen-data/tasks/basic/run.sh
new file mode 100644
index 0000000..0118ad3
--- /dev/null
+++ b/postgresql-tests/gen-data/tasks/basic/run.sh
@@ -0,0 +1,6 @@
+export task_name="basic"
+
+run()
+{
+ create_pagila
+}
diff --git a/postgresql-tests/gen-data/tasks/locale-cz/run.sh b/postgresql-tests/gen-data/tasks/locale-cz/run.sh
new file mode 100644
index 0000000..1788557
--- /dev/null
+++ b/postgresql-tests/gen-data/tasks/locale-cz/run.sh
@@ -0,0 +1,5 @@
+export task_name="locale-cz"
+
+export ___new_locale="LANG=cs_CZ.utf8"
+
+. ./tasks/templates/locale-change.sh
diff --git a/postgresql-tests/gen-data/tasks/locale-utf-typo/run.sh b/postgresql-tests/gen-data/tasks/locale-utf-typo/run.sh
new file mode 100644
index 0000000..9004a88
--- /dev/null
+++ b/postgresql-tests/gen-data/tasks/locale-utf-typo/run.sh
@@ -0,0 +1,5 @@
+export task_name="locale-utf-typo"
+
+export ___new_locale="LANG=en_US.utf8"
+
+. ./tasks/templates/locale-change.sh
diff --git a/postgresql-tests/gen-data/tasks/templates/locale-change.sh b/postgresql-tests/gen-data/tasks/templates/locale-change.sh
new file mode 100644
index 0000000..8f7964f
--- /dev/null
+++ b/postgresql-tests/gen-data/tasks/templates/locale-change.sh
@@ -0,0 +1,16 @@
+hook_start()
+{
+ export CHECK_LOCALE=0
+ ___old_locale="$(cat /etc/locale.conf)"
+ echo "$___new_locale" > /etc/locale.conf
+}
+
+hook_end()
+{
+ echo "$___old_locale" > /etc/locale.conf
+}
+
+run()
+{
+ create_pagila
+}