Rename real_db_upgrade plugin
The 'gate' part of the plugin name is misleading and unncessary. Change-Id: I4f29e110da4f2c00076ba17e31a0f3b3d66463aa
This commit is contained in:
parent
0759d0262d
commit
ab964fbca2
@ -45,7 +45,7 @@ Plugins can be used to extend turbo-hipster's capabilities.
|
||||
|
||||
.. 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 @@ the ``config.yaml`` configuration file.
|
||||
|
||||
.. 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 @@ turbo-hipster's configuration file.
|
||||
editor, locate the plugins section, and add this line::
|
||||
|
||||
**plugins**
|
||||
gate_real_db_upgrade
|
||||
real_db_upgrade
|
||||
|
||||
Testing with turbo-hipster
|
||||
==========================
|
||||
|
@ -11,29 +11,29 @@ git_working_dir: /var/lib/turbo-hipster/git
|
||||
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
|
||||
|
@ -8,9 +8,9 @@ jobs_working_dir: /home/josh/var/lib/turbo-hipster/jobs
|
||||
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
|
||||
|
@ -11,13 +11,13 @@ git_working_dir: /var/lib/turbo-hipster/git
|
||||
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
|
||||
|
@ -16,7 +16,7 @@ import json
|
||||
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__))
|
||||
|
||||
|
@ -29,14 +29,14 @@ class TestWorkerServer(base.TestWithGearman):
|
||||
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 @@ class TestWorkerServer(base.TestWithGearman):
|
||||
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 @@ class TestZuulClient(base.TestWithGearman):
|
||||
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)
|
||||
|
@ -27,7 +27,7 @@ import yaml
|
||||
|
||||
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 @@ def main():
|
||||
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):
|
||||
|
@ -23,7 +23,7 @@ from turbo_hipster.lib import models
|
||||
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 @@ MIGRATION_END_RE = re.compile('^done$')
|
||||
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)
|
@ -23,4 +23,4 @@ class Runner(models.ShellTask):
|
||||
"""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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user