Skip to content

Commit

Permalink
fix: use properly camel cased form of mapReduce for command
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Feb 11, 2020
1 parent e855c83 commit c1ed2c1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/operations/map_reduce.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MapReduceOperation extends OperationBase {
let options = this.options;

const mapCommandHash = {
mapreduce: coll.collectionName,
mapReduce: coll.collectionName,
map: map,
reduce: reduce
};
Expand Down
4 changes: 2 additions & 2 deletions test/functional/collations.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe('Collation', function() {
}
});

it('Successfully pass through collation to mapreduce command', {
it('Successfully pass through collation to mapReduce command', {
metadata: { requires: { generators: true, topology: 'single' } },

test: function() {
Expand All @@ -223,7 +223,7 @@ describe('Collation', function() {
var doc = request.document;
if (doc.ismaster) {
request.reply(primary[0]);
} else if (doc.mapreduce) {
} else if (doc.mapReduce) {
commandResult = doc;
request.reply({ ok: 1, result: 'tempCollection' });
} else if (doc.endSessions) {
Expand Down
4 changes: 2 additions & 2 deletions test/functional/command_write_concern.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ describe('Command Write Concern', function() {
}
});

it('successfully pass through writeConcern to dropIndexes command', {
it('successfully pass through writeConcern to mapReduce command', {
metadata: {
requires: {
generators: true,
Expand Down Expand Up @@ -798,7 +798,7 @@ describe('Command Write Concern', function() {
var doc = request.document;
if (doc.ismaster) {
request.reply(primary[0]);
} else if (doc.mapreduce) {
} else if (doc.mapReduce) {
commandResult = doc;
request.reply({ ok: 1, result: 'tempCollection' });
} else if (doc.endSessions) {
Expand Down
6 changes: 3 additions & 3 deletions test/functional/readconcern.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,13 @@ describe('ReadConcern', function() {
const reduce = 'function(k,vals) { return 1; }';

// Listen to apm events
client.on('commandStarted', filterForCommands('mapreduce', started));
client.on('commandSucceeded', filterForCommands('mapreduce', succeeded));
client.on('commandStarted', filterForCommands('mapReduce', started));
client.on('commandSucceeded', filterForCommands('mapReduce', succeeded));

// Execute mapReduce
collection.mapReduce(map, reduce, { out: { replace: 'tempCollection' } }, err => {
expect(err).to.not.exist;
validateTestResults(started, succeeded, 'mapreduce');
validateTestResults(started, succeeded, 'mapReduce');
done();
});
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/readpreference.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe('ReadPreference', function() {
/**
* @ignore
*/
it('Should fail due to not using mapreduce inline with read preference', {
it('Should fail due to not using mapReduce inline with read preference', {
metadata: { requires: { mongodb: '>=2.6.0', topology: ['single', 'ssl'] } },

// The actual test we wish to run
Expand Down
2 changes: 1 addition & 1 deletion test/unit/bypass_validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('bypass document validation', function() {

test.server.setMessageHandler(request => {
const doc = request.document;
if (doc.mapreduce) {
if (doc.mapReduce) {
try {
expect(doc.bypassDocumentValidation).equal(config.expected);
request.reply({
Expand Down

0 comments on commit c1ed2c1

Please sign in to comment.