Fix hacking and requirements
Change-Id: Ie7a36b0a7957f102b6a1195cdc7c0403cdd9545a
This commit is contained in:
parent
5ef62278f3
commit
a4b178d1f1
@ -1,4 +1,3 @@
|
||||
pbr>=0.5.21,<0.6
|
||||
gear>=0.5.4,<1.0.0
|
||||
python-swiftclient
|
||||
python-keystoneclient
|
||||
|
@ -15,10 +15,6 @@ classifier =
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 2.6
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[files]
|
||||
packages =
|
||||
turbo_hipster
|
||||
|
@ -1,8 +1,4 @@
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
pep8==1.4.5
|
||||
pyflakes==0.7.2
|
||||
flake8==2.0
|
||||
hacking>=0.5.6,<0.7
|
||||
hacking>=0.9.2,<0.10
|
||||
coverage>=3.6
|
||||
|
||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||
|
@ -136,7 +136,7 @@ class TestTaskRunner(base.TestWithGearman):
|
||||
def side_effect():
|
||||
raise Exception('check results failed!')
|
||||
|
||||
#ShellTask._parse_and_check_results = _fake_parse_and_check_results
|
||||
# ShellTask._parse_and_check_results = _fake_parse_and_check_results
|
||||
mocked_parse_and_check_results.side_effect = side_effect
|
||||
|
||||
self.start_server()
|
||||
|
@ -33,8 +33,7 @@ from turbo_hipster.task_plugins.real_db_upgrade import handle_results
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-c', '--config',
|
||||
default=
|
||||
'/etc/turbo-hipster/config.yaml',
|
||||
default='/etc/turbo-hipster/config.yaml',
|
||||
help='Path to yaml config file.')
|
||||
args = parser.parse_args()
|
||||
|
||||
@ -82,7 +81,7 @@ def main():
|
||||
if cursor.rowcount == 0:
|
||||
for engine, dataset, migration in process(
|
||||
connection, swift_config['container'], item['name']):
|
||||
if not 'duration' in migration:
|
||||
if 'duration' not in migration:
|
||||
continue
|
||||
|
||||
if migration['stats']:
|
||||
@ -145,9 +144,9 @@ def process(connection, container, name):
|
||||
log.warn('Log %s contained no migrations' % name)
|
||||
|
||||
for migration in lp.migrations:
|
||||
if not 'start' in migration:
|
||||
if 'start' not in migration:
|
||||
continue
|
||||
if not 'end' in migration:
|
||||
if 'end' not in migration:
|
||||
continue
|
||||
yield (engine_name, test_name, migration)
|
||||
|
||||
|
@ -116,7 +116,7 @@ def process_dataset(dataset):
|
||||
math.ceil(recommend)
|
||||
|
||||
# Innodb stats
|
||||
if not migration in stats_summary:
|
||||
if migration not in stats_summary:
|
||||
continue
|
||||
|
||||
for stats_key in ['XInnodb_rows_changed', 'Innodb_rows_read']:
|
||||
|
@ -65,8 +65,7 @@ def main():
|
||||
os.path.join(os.path.dirname(__file__), '../')))
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-c', '--config',
|
||||
default=
|
||||
'/etc/turbo-hipster/config.yaml',
|
||||
default='/etc/turbo-hipster/config.yaml',
|
||||
help='Path to yaml config file.')
|
||||
parser.add_argument('-b', '--background', action='store_true',
|
||||
help='Run as a daemon in the background.')
|
||||
|
@ -188,7 +188,7 @@ def check_log_file(log_file, git_path, dataset):
|
||||
migration.setdefault('stats', {})
|
||||
|
||||
# check migration completed
|
||||
if not 'duration' in migration:
|
||||
if 'duration' not in migration:
|
||||
success = False
|
||||
messages.append('WARNING - Migration %s->%s failed to complete'
|
||||
% (migration['from'], migration['to']))
|
||||
|
Loading…
Reference in New Issue
Block a user