mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
17 lines
407 B
JavaScript
17 lines
407 B
JavaScript
if ( ! _isWindows() ) {
|
|
hoststring = db.getMongo().host
|
|
index = hoststring.lastIndexOf(':')
|
|
if (index == -1){
|
|
port = '27017'
|
|
} else {
|
|
port = hoststring.substr(index + 1)
|
|
}
|
|
|
|
sock = new Mongo('/tmp/mongodb-' + port + '.sock')
|
|
sockdb = sock.getDB(db.getName())
|
|
assert( sockdb.runCommand('ping').ok )
|
|
|
|
} else {
|
|
print("Not testing unix sockets on Windows");
|
|
}
|