From 3fd751467f1aeb897d21efbeb6c843cba6088647 Mon Sep 17 00:00:00 2001 From: Joshua Thompson Date: Tue, 9 Aug 2016 10:32:25 -0700 Subject: [PATCH] Move sharding_utils.py to py/vttest --- py/vttest/run_local_database.py | 7 +++---- {test => py/vttest}/sharding_utils.py | 0 test/end2end/base_environment.py | 2 +- test/end2end/reparent_test.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) rename {test => py/vttest}/sharding_utils.py (100%) diff --git a/py/vttest/run_local_database.py b/py/vttest/run_local_database.py index edc631e484..ec73c38781 100755 --- a/py/vttest/run_local_database.py +++ b/py/vttest/run_local_database.py @@ -40,11 +40,10 @@ from vttest import environment from vttest import local_database from vttest import mysql_flavor from vttest import init_data_options +from vttest import sharding_utils from vtproto import vttest_pb2 -import sharding_utils - def main(cmdline_options): topology = vttest_pb2.VTTestTopology() @@ -169,9 +168,9 @@ if __name__ == '__main__': help='Comma separated list of keyspaces') parser.add_option('--num_shards', default='2', help='Comma separated shard count (one per keyspace)') - parser.add_option('--replica_count', default=2, + parser.add_option('--replica_count', type='int', default=2, help='Replica tablets per shard (includes master)') - parser.add_option('--rdonly_count', default=1, + parser.add_option('--rdonly_count', type='int', default=1, help='Rdonly tablets per shard') (options, args) = parser.parse_args() if options.verbose: diff --git a/test/sharding_utils.py b/py/vttest/sharding_utils.py similarity index 100% rename from test/sharding_utils.py rename to py/vttest/sharding_utils.py diff --git a/test/end2end/base_environment.py b/test/end2end/base_environment.py index 1ba151d31f..91db7412c5 100644 --- a/test/end2end/base_environment.py +++ b/test/end2end/base_environment.py @@ -5,7 +5,7 @@ common to all environments. """ import json -import sharding_utils +from vttest import sharding_utils class VitessEnvironmentError(Exception): diff --git a/test/end2end/reparent_test.py b/test/end2end/reparent_test.py index 6a4009adb5..e543fac54d 100755 --- a/test/end2end/reparent_test.py +++ b/test/end2end/reparent_test.py @@ -10,11 +10,11 @@ import numpy import logging import base_end2end_test -import sharding_utils import utils import vtctl_helper from vtproto import topodata_pb2 +from vttest import sharding_utils def setUpModule():