diff --git a/test/functional/buffering_proxy.test.js b/test/functional/buffering_proxy.test.js index 8892f104967..5a54c23bb9a 100644 --- a/test/functional/buffering_proxy.test.js +++ b/test/functional/buffering_proxy.test.js @@ -35,7 +35,7 @@ describe.skip('Buffering Proxy', function () { var electionIds = [new ObjectId(0), new ObjectId(1)]; // Default message fields - var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER_36, { + var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, { setName: 'rs', setVersion: 1, electionId: electionIds[0], @@ -252,7 +252,7 @@ describe.skip('Buffering Proxy', function () { var electionIds = [new ObjectId(0), new ObjectId(1)]; // Default message fields - var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER_36, { + var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, { setName: 'rs', setVersion: 1, electionId: electionIds[0], diff --git a/test/functional/collations.test.js b/test/functional/collations.test.js index 250fa73d5ff..fd237d3e79d 100644 --- a/test/functional/collations.test.js +++ b/test/functional/collations.test.js @@ -21,7 +21,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -57,7 +57,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -95,7 +95,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -131,7 +131,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -172,7 +172,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -208,7 +208,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -246,7 +246,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -282,7 +282,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -320,7 +320,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -356,7 +356,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -469,7 +469,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { @@ -624,7 +624,7 @@ describe('Collation', function () { test: function () { const configuration = this.configuration; const client = configuration.newClient(`mongodb://${testContext.server.uri()}/test`); - const primary = [Object.assign({}, mock.DEFAULT_ISMASTER_36)]; + const primary = [Object.assign({}, mock.DEFAULT_ISMASTER)]; let commandResult; testContext.server.setMessageHandler(request => { diff --git a/test/functional/command_write_concern.test.js b/test/functional/command_write_concern.test.js index 26798199b63..adaab4ee4ae 100644 --- a/test/functional/command_write_concern.test.js +++ b/test/functional/command_write_concern.test.js @@ -11,7 +11,7 @@ class WriteConcernTest { this.configuration = configuration; this.responseDecoration = {}; const electionIds = [new ObjectId(), new ObjectId()]; - const defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER_36, { + const defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, { setName: 'rs', setVersion: 1, electionId: electionIds[0], diff --git a/test/functional/max_staleness.test.js b/test/functional/max_staleness.test.js index b99825a6e5b..634819ece78 100644 --- a/test/functional/max_staleness.test.js +++ b/test/functional/max_staleness.test.js @@ -11,7 +11,7 @@ describe('Max Staleness', function () { return mock.createServer().then(server => { test.server = server; - const defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER_36, { msg: 'isdbgrid' }); + const defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, { msg: 'isdbgrid' }); // Primary server states const serverIsMaster = [Object.assign({}, defaultFields)]; diff --git a/test/functional/replicaset_mock.test.js b/test/functional/replicaset_mock.test.js index bda770fdb8c..8008650f6fe 100644 --- a/test/functional/replicaset_mock.test.js +++ b/test/functional/replicaset_mock.test.js @@ -9,12 +9,12 @@ describe('ReplSet (mocks)', function () { afterEach(() => mock.cleanup()); beforeEach(() => { // Default message fields - const defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER_36, { + const defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, { msg: 'isdbgrid' }); // Default message fields - const defaultRSFields = Object.assign({}, mock.DEFAULT_ISMASTER_36, { + const defaultRSFields = Object.assign({}, mock.DEFAULT_ISMASTER, { setName: 'rs', setVersion: 1, electionId: new ObjectId(), diff --git a/test/functional/unit-sessions/client.test.js b/test/functional/unit-sessions/client.test.js index 863595c8ab2..6fae9d46c3f 100644 --- a/test/functional/unit-sessions/client.test.js +++ b/test/functional/unit-sessions/client.test.js @@ -116,7 +116,7 @@ describe('Sessions - client/unit', function () { var doc = request.document; if (doc.ismaster || doc.hello) { request.reply( - Object.assign({}, mock.DEFAULT_ISMASTER_36, { + Object.assign({}, mock.DEFAULT_ISMASTER, { logicalSessionTimeoutMinutes: 10 }) ); diff --git a/test/functional/unit_db_list_collections.test.js b/test/functional/unit_db_list_collections.test.js index 47a18e965fd..b1c1ca01239 100644 --- a/test/functional/unit_db_list_collections.test.js +++ b/test/functional/unit_db_list_collections.test.js @@ -71,6 +71,6 @@ describe('db.listCollections', function () { }); } - it(config.description, { test: testFn, metadata: { requires: { mongodb: '>=3.6.0' } } }); + it(config.description, { test: testFn, metadata: { requires: { mongodb: '>=2.7.6' } } }); }); }); diff --git a/test/functional/view.test.js b/test/functional/view.test.js index 6f32ce94ba4..d29899e3a48 100644 --- a/test/functional/view.test.js +++ b/test/functional/view.test.js @@ -13,7 +13,7 @@ describe('Views', function () { const configuration = this.configuration; // Default message fields - var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER_36); + var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER); // Primary server states var primary = [Object.assign({}, defaultFields)]; diff --git a/test/unit/_MISC_scram_iterations.test.js b/test/unit/_MISC_scram_iterations.test.js index ae4d8806e62..c8d828fc147 100644 --- a/test/unit/_MISC_scram_iterations.test.js +++ b/test/unit/_MISC_scram_iterations.test.js @@ -81,7 +81,7 @@ describe('SCRAM Iterations Tests', function () { server.setMessageHandler(request => { const doc = request.document; if (doc.ismaster || doc.hello) { - return request.reply(Object.assign({}, mock.DEFAULT_ISMASTER_36)); + return request.reply(Object.assign({}, mock.DEFAULT_ISMASTER)); } else if (doc.saslStart) { return request.reply({ ok: 1, @@ -128,7 +128,7 @@ describe('SCRAM Iterations Tests', function () { server.setMessageHandler(request => { const doc = request.document; if (doc.ismaster || doc.hello) { - return request.reply(Object.assign({}, mock.DEFAULT_ISMASTER_36)); + return request.reply(Object.assign({}, mock.DEFAULT_ISMASTER)); } else if (doc.saslStart) { return request.reply({ ok: 1, diff --git a/test/unit/cursor/find_cursor.test.js b/test/unit/cursor/find_cursor.test.js index 721798dd92f..406375464c8 100644 --- a/test/unit/cursor/find_cursor.test.js +++ b/test/unit/cursor/find_cursor.test.js @@ -31,7 +31,7 @@ describe('Find Cursor', function () { const doc = request.document; if (doc.ismaster || doc.hello) { request.reply( - Object.assign({}, mock.DEFAULT_ISMASTER_36, { + Object.assign({}, mock.DEFAULT_ISMASTER, { maxWireVersion: 6 }) );