diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:17:50 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:18:14 -0500 |
commit | 4ae691e8edc87d0e3cfb633bb91c328426be007b (patch) | |
tree | 52079a593f54382ca13a2e741633eab1b6271893 /jstests/sharding/copydb_from_mongos.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/sharding/copydb_from_mongos.js')
-rw-r--r-- | jstests/sharding/copydb_from_mongos.js | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/jstests/sharding/copydb_from_mongos.js b/jstests/sharding/copydb_from_mongos.js index aa6ac16b465..66db42407ca 100644 --- a/jstests/sharding/copydb_from_mongos.js +++ b/jstests/sharding/copydb_from_mongos.js @@ -1,26 +1,22 @@ (function() { -var st = new ShardingTest({ shards: 1 }); + var st = new ShardingTest({shards: 1}); -var testDB = st.s.getDB('test'); -assert.writeOK(testDB.foo.insert({ a: 1 })); + var testDB = st.s.getDB('test'); + assert.writeOK(testDB.foo.insert({a: 1})); -var res = testDB.adminCommand({ copydb: 1, - fromhost: st.s.host, - fromdb: 'test', - todb: 'test_copy' }); -assert.commandWorked(res); + var res = + testDB.adminCommand({copydb: 1, fromhost: st.s.host, fromdb: 'test', todb: 'test_copy'}); + assert.commandWorked(res); -var copy = st.s.getDB('test_copy'); -assert.eq(1, copy.foo.count()); -assert.eq(1, copy.foo.findOne().a); + var copy = st.s.getDB('test_copy'); + assert.eq(1, copy.foo.count()); + assert.eq(1, copy.foo.findOne().a); -// Test invalid todb database name. -assert.commandFailed(testDB.adminCommand({ copydb: 1, - fromhost: st.s.host, - fromdb: 'test_copy', - todb: 'test/copy' })); + // Test invalid todb database name. + assert.commandFailed(testDB.adminCommand( + {copydb: 1, fromhost: st.s.host, fromdb: 'test_copy', todb: 'test/copy'})); -st.stop(); + st.stop(); })(); |