Rename real_db_upgrade plugin
The 'gate' part of the plugin name is misleading and unncessary.
Change-Id: I4f29e110da4f2c00076ba17e31a0f3b3d66463aa
diff --git a/doc/source/running.rst b/doc/source/running.rst
index c7cd9e2..7613662 100644
--- a/doc/source/running.rst
+++ b/doc/source/running.rst
@@ -45,7 +45,7 @@
.. note::
Currently, the only available plugin for turbo-hipster is the
- database migration plugin, ``gate_real_db_upgrade``, which tests code
+ database migration plugin, ``real_db_upgrade``, which tests code
against a variety of real-world databases.
Installing plugins
@@ -65,16 +65,16 @@
.. FIXME More config information required here
-Plugin: Database migration with ``gate_real_db_upgrade``
+Plugin: Database migration with ``real_db_upgrade``
--------------------------------------------------------
-The database migration plugin, ``gate_real_db_upgrade``, is used to test
+The database migration plugin, ``real_db_upgrade``, is used to test
datasets against real-world, anonymized, databases.
Migrating a database
--------------------
-In order to use turbo-hipster with the ``gate_real_db_upgrade`` plugin, you
+In order to use turbo-hipster with the ``real_db_upgrade`` plugin, you
need to set up the databases to test against, and point to the plugin in
turbo-hipster's configuration file.
@@ -90,7 +90,7 @@
editor, locate the plugins section, and add this line::
**plugins**
- gate_real_db_upgrade
+ real_db_upgrade
Testing with turbo-hipster
==========================
diff --git a/etc/turbo-hipster/config.yaml b/etc/turbo-hipster/config.yaml
index 399c44c..ad86e66 100644
--- a/etc/turbo-hipster/config.yaml
+++ b/etc/turbo-hipster/config.yaml
@@ -11,29 +11,29 @@
pip_download_cache: /var/cache/pip
plugins:
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_devstack_131007
- function: build:gate-real-db-upgrade_nova_mysql_devstack_131007
+ function: build:real-db-upgrade_nova_mysql_devstack_131007
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_devstack_150
- function: build:gate-real-db-upgrade_nova_mysql_devstack_150
+ function: build:real-db-upgrade_nova_mysql_devstack_150
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_trivial_500
- function: build:gate-real-db-upgrade_nova_mysql_trivial_500
+ function: build:real-db-upgrade_nova_mysql_trivial_500
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_trivial_6000
- function: build:gate-real-db-upgrade_nova_mysql_trivial_6000
+ function: build:real-db-upgrade_nova_mysql_trivial_6000
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_user_001
- function: build:gate-real-db-upgrade_nova_mysql_user_001
+ function: build:real-db-upgrade_nova_mysql_user_001
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_user_002
- function: build:gate-real-db-upgrade_nova_mysql_user_002
+ function: build:real-db-upgrade_nova_mysql_user_002
publish_logs:
type: swift
diff --git a/tests/etc/config.yaml b/tests/etc/config.yaml
index 0e332ee..e43b024 100644
--- a/tests/etc/config.yaml
+++ b/tests/etc/config.yaml
@@ -8,9 +8,9 @@
git_working_dir: /home/josh/var/lib/turbo-hipster/git
pip_download_cache: /home/josh/var/cache/pip
plugins:
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir": /home/josh/var/lib/turbo-hipster/datasets
- job: gate-real-db-upgrade_nova_mysql
+ job: real-db-upgrade_nova_mysql
publish_logs:
type: local
diff --git a/tests/etc/default-config.yaml b/tests/etc/default-config.yaml
index 0412e01..b2e17dc 100644
--- a/tests/etc/default-config.yaml
+++ b/tests/etc/default-config.yaml
@@ -11,13 +11,13 @@
pip_download_cache: /var/cache/pip
plugins:
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_devstack_131007
- function: build:gate-real-db-upgrade_nova_mysql_devstack_131007
+ function: build:real-db-upgrade_nova_mysql_devstack_131007
- - name: gate_real_db_upgrade
+ - name: real_db_upgrade
datasets_dir: /var/lib/turbo-hipster/datasets_user_001
- function: build:gate-real-db-upgrade_nova_mysql_user_001
+ function: build:real-db-upgrade_nova_mysql_user_001
- name: shell_script
function: build:do_something_shelly
diff --git a/tests/test_real_db_upgrade.py b/tests/test_real_db_upgrade.py
index 0a88156..0f79525 100644
--- a/tests/test_real_db_upgrade.py
+++ b/tests/test_real_db_upgrade.py
@@ -16,7 +16,7 @@
import os
import testtools
-from turbo_hipster.task_plugins.gate_real_db_upgrade import handle_results
+from turbo_hipster.task_plugins.real_db_upgrade import handle_results
TESTS_DIR = os.path.join(os.path.dirname(__file__))
diff --git a/tests/test_worker_manager.py b/tests/test_worker_manager.py
index 741f223..7fe2d35 100644
--- a/tests/test_worker_manager.py
+++ b/tests/test_worker_manager.py
@@ -29,14 +29,14 @@
self.assertEqual(3, len(self.worker_server.plugins))
plugin0_config = {
- "name": "gate_real_db_upgrade",
+ "name": "real_db_upgrade",
"datasets_dir": "/var/lib/turbo-hipster/datasets_devstack_131007",
- "function": "build:gate-real-db-upgrade_nova_mysql_devstack_131007"
+ "function": "build:real-db-upgrade_nova_mysql_devstack_131007"
}
plugin1_config = {
- "name": "gate_real_db_upgrade",
+ "name": "real_db_upgrade",
"datasets_dir": "/var/lib/turbo-hipster/datasets_user_001",
- "function": "build:gate-real-db-upgrade_nova_mysql_user_001"
+ "function": "build:real-db-upgrade_nova_mysql_user_001"
}
plugin2_config = {
"name": "shell_script",
@@ -46,14 +46,14 @@
self.assertEqual(plugin0_config,
self.worker_server.plugins[0]['plugin_config'])
self.assertEqual(
- 'turbo_hipster.task_plugins.gate_real_db_upgrade.task',
+ 'turbo_hipster.task_plugins.real_db_upgrade.task',
self.worker_server.plugins[0]['module'].__name__
)
self.assertEqual(plugin1_config,
self.worker_server.plugins[1]['plugin_config'])
self.assertEqual(
- 'turbo_hipster.task_plugins.gate_real_db_upgrade.task',
+ 'turbo_hipster.task_plugins.real_db_upgrade.task',
self.worker_server.plugins[1]['module'].__name__
)
@@ -104,9 +104,9 @@
self.fail("The correct number of functions haven't registered with"
" gearman")
- self.assertIn('build:gate-real-db-upgrade_nova_mysql_devstack_131007',
+ self.assertIn('build:real-db-upgrade_nova_mysql_devstack_131007',
self.gearman_server.functions)
- self.assertIn('build:gate-real-db-upgrade_nova_mysql_user_001',
+ self.assertIn('build:real-db-upgrade_nova_mysql_user_001',
self.gearman_server.functions)
self.assertIn('build:do_something_shelly',
self.gearman_server.functions)
diff --git a/turbo_hipster/cmd/analyse_historical.py b/turbo_hipster/cmd/analyse_historical.py
index 2b2ba16..c76ed4f 100644
--- a/turbo_hipster/cmd/analyse_historical.py
+++ b/turbo_hipster/cmd/analyse_historical.py
@@ -27,7 +27,7 @@
import swiftclient
-from turbo_hipster.task_plugins.gate_real_db_upgrade import handle_results
+from turbo_hipster.task_plugins.real_db_upgrade import handle_results
def main():
@@ -112,8 +112,8 @@
items = connection.get_container(swift_config['container'],
marker=item['name'], limit=1000)[1]
-TEST_NAME1_RE = re.compile('.*/gate-real-db-upgrade_nova_([^_]+)_([^/]*)/.*')
-TEST_NAME2_RE = re.compile('.*/gate-real-db-upgrade_nova_([^_]+)/.*/(.*).log')
+TEST_NAME1_RE = re.compile('.*/real-db-upgrade_nova_([^_]+)_([^/]*)/.*')
+TEST_NAME2_RE = re.compile('.*/real-db-upgrade_nova_([^_]+)/.*/(.*).log')
def process(connection, container, name):
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/__init__.py b/turbo_hipster/task_plugins/real_db_upgrade/__init__.py
similarity index 100%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/__init__.py
rename to turbo_hipster/task_plugins/real_db_upgrade/__init__.py
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/baseline.sh b/turbo_hipster/task_plugins/real_db_upgrade/baseline.sh
similarity index 100%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/baseline.sh
rename to turbo_hipster/task_plugins/real_db_upgrade/baseline.sh
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/handle_results.py b/turbo_hipster/task_plugins/real_db_upgrade/handle_results.py
similarity index 100%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/handle_results.py
rename to turbo_hipster/task_plugins/real_db_upgrade/handle_results.py
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/makenetnamespace.sh b/turbo_hipster/task_plugins/real_db_upgrade/makenetnamespace.sh
similarity index 100%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/makenetnamespace.sh
rename to turbo_hipster/task_plugins/real_db_upgrade/makenetnamespace.sh
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/nova-manage-wrapper.sh b/turbo_hipster/task_plugins/real_db_upgrade/nova-manage-wrapper.sh
similarity index 100%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/nova-manage-wrapper.sh
rename to turbo_hipster/task_plugins/real_db_upgrade/nova-manage-wrapper.sh
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/nova_mysql_migrations.sh b/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh
similarity index 100%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/nova_mysql_migrations.sh
rename to turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh
diff --git a/turbo_hipster/task_plugins/gate_real_db_upgrade/task.py b/turbo_hipster/task_plugins/real_db_upgrade/task.py
similarity index 97%
rename from turbo_hipster/task_plugins/gate_real_db_upgrade/task.py
rename to turbo_hipster/task_plugins/real_db_upgrade/task.py
index f3f4165..510cdee 100644
--- a/turbo_hipster/task_plugins/gate_real_db_upgrade/task.py
+++ b/turbo_hipster/task_plugins/real_db_upgrade/task.py
@@ -23,7 +23,7 @@
from turbo_hipster.lib import utils
-import turbo_hipster.task_plugins.gate_real_db_upgrade.handle_results\
+import turbo_hipster.task_plugins.real_db_upgrade.handle_results\
as handle_results
@@ -35,10 +35,10 @@
class Runner(models.ShellTask):
""" This thread handles the actual sql-migration tests.
- It pulls in a gearman job from the build:gate-real-db-upgrade
+ It pulls in a gearman job from the build:real-db-upgrade
queue and runs it through _handle_patchset"""
- log = logging.getLogger("task_plugins.gate_real_db_upgrade.task.Runner")
+ log = logging.getLogger("task_plugins.real_db_upgrade.task.Runner")
def __init__(self, worker_server, plugin_config, job_name):
super(Runner, self).__init__(worker_server, plugin_config, job_name)
diff --git a/turbo_hipster/task_plugins/shell_script/task.py b/turbo_hipster/task_plugins/shell_script/task.py
index d798704..ce08729 100644
--- a/turbo_hipster/task_plugins/shell_script/task.py
+++ b/turbo_hipster/task_plugins/shell_script/task.py
@@ -23,4 +23,4 @@
"""A plugin to run any shell script as defined in the config. Based on
models.ShellTask the steps can be overwritten."""
- log = logging.getLogger("task_plugins.gate_real_db_upgrade.task.Runner")
+ log = logging.getLogger("task_plugins.shell_script.task.Runner")