diff --git a/bigchaindb/commands/bigchain.py b/bigchaindb/commands/bigchain.py index e6b4314d..28831642 100644 --- a/bigchaindb/commands/bigchain.py +++ b/bigchaindb/commands/bigchain.py @@ -204,7 +204,7 @@ def run_load(args): workers.start() -def run_sharding(args): +def run_set_shards(args): b = bigchaindb.Bigchain() r.table('bigchain').reconfigure(shards=args.num_shards, replicas=1).run(b.conn) r.table('backlog').reconfigure(shards=args.num_shards, replicas=1).run(b.conn) @@ -251,7 +251,7 @@ def main(): help='Start BigchainDB') # parser for configuring the number of shards - sharding_parser = subparsers.add_parser('sharding', + sharding_parser = subparsers.add_parser('set-shards', help='Configure number of shards') sharding_parser.add_argument('num_shards', metavar='num_shards', type=int, default=1, diff --git a/tests/test_commands.py b/tests/test_commands.py index f90bc503..4b35edbb 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -229,11 +229,11 @@ def test_start_rethinkdb_exits_when_cannot_start(mock_popen): def test_configure_sharding(b): import rethinkdb as r - from bigchaindb.commands.bigchain import run_sharding + from bigchaindb.commands.bigchain import run_set_shards # change number of shards args = Namespace(num_shards=3) - run_sharding(args) + run_set_shards(args) # retrieve table configuration table_config = list(r.db('rethinkdb')