Comment 3 for bug 1261452

Revision history for this message
John A Meinel (jameinel) wrote :

So I tried this patch:
=== modified file 'testing/mgo.go'
--- testing/mgo.go 2013-11-06 13:38:01 +0000
+++ testing/mgo.go 2013-12-18 06:23:25 +0000
@@ -99,6 +99,7 @@
   "--noprealloc",
   "--smallfiles",
   "--nojournal",
+ "--noscripting",
   "--nounixsocket",
  }
  server := exec.Command("mongod", mgoargs...)

And with it, the test suite still passes 100% for me.

I did try connecting to one of the mongodb instances running during the test suite and run:
> db.eval("hello")
Wed Dec 18 11:06:31 uncaught exception: { "errmsg" : "db side execution is disabled", "ok" : 0 }

I even tried:
> var map = function() { emit ( this._id, this.format) }
> var reduce = function(key, values) {return Array.sum(values)}
> db.charms.mapReduce(map, reduce, {out: "format"})
Wed Dec 18 11:13:09 uncaught exception: map reduce failed:{
 "errmsg" : "exception: cannot run map reduce without the js engine",
 "code" : 16149,
 "ok" : 0
}

So I have a strong feeling that --noscripting does what we want it to, and that we don't, indeed, need the ability.

I'm not sure what test Michael had seen that used something that needed scripting, but I'm running against mongodb 2.2.4 and it seems to be working with --noscripting set up.