print nothing if tests does not exist
This commit is contained in:
parent
21daa03a2f
commit
7a41f5be82
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
HERE=`dirname $0`
|
HERE=`dirname $0`
|
||||||
|
|
||||||
|
if [ ! -f $HERE/../tests/mongo-qa/$1 ] ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
begintime=`date`
|
begintime=`date`
|
||||||
ruby $HERE/../tests/mongo-qa/$1 >> $2
|
ruby $HERE/../tests/mongo-qa/$1 >> $2
|
||||||
exitval=$?
|
exitval=$?
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
require File.join(File.dirname(__FILE__), '_common.rb')
|
|
||||||
db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB)
|
|
||||||
|
|
||||||
if __FILE__ == $0
|
|
||||||
%w(a b c).each { |name| db.drop_collection(name) }
|
|
||||||
end
|
|
||||||
|
|
||||||
colla = db.collection('a')
|
|
||||||
collb = db.collection('b')
|
|
||||||
collc = db.collection('c')
|
|
||||||
|
|
||||||
colla.insert('c' => 'b')
|
|
||||||
collb.insert('c' => 1)
|
|
||||||
|
|
||||||
x_id = ObjectID.new
|
|
||||||
x_dbref = DBRef.new(nil, 'thiz', db, 'c', x_id)
|
|
||||||
x = {'_id' => x_id, 'that' => 2, 'thiz' => x_dbref}
|
|
||||||
collc.insert(x)
|
|
Loading…
Reference in New Issue