summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/directoryperdb.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/directoryperdb.js')
-rw-r--r--jstests/noPassthrough/directoryperdb.js52
1 files changed, 26 insertions, 26 deletions
diff --git a/jstests/noPassthrough/directoryperdb.js b/jstests/noPassthrough/directoryperdb.js
index ce123ae08fb..56fe3c1f645 100644
--- a/jstests/noPassthrough/directoryperdb.js
+++ b/jstests/noPassthrough/directoryperdb.js
@@ -8,39 +8,39 @@
*/
(function() {
- 'use strict';
+'use strict';
- var baseDir = "jstests_directoryperdb";
- var dbpath = MongoRunner.dataPath + baseDir + "/";
+var baseDir = "jstests_directoryperdb";
+var dbpath = MongoRunner.dataPath + baseDir + "/";
- var isDirectoryPerDBSupported =
- jsTest.options().storageEngine == "wiredTiger" || !jsTest.options().storageEngine;
+var isDirectoryPerDBSupported =
+ jsTest.options().storageEngine == "wiredTiger" || !jsTest.options().storageEngine;
- var m = MongoRunner.runMongod({dbpath: dbpath, directoryperdb: ''});
+var m = MongoRunner.runMongod({dbpath: dbpath, directoryperdb: ''});
- if (!isDirectoryPerDBSupported) {
- assert.isnull(m, 'storage engine without directoryperdb support should fail to start up');
- return;
- } else {
- assert(m, 'storage engine with directoryperdb support failed to start up');
- }
+if (!isDirectoryPerDBSupported) {
+ assert.isnull(m, 'storage engine without directoryperdb support should fail to start up');
+ return;
+} else {
+ assert(m, 'storage engine with directoryperdb support failed to start up');
+}
- var db = m.getDB("foo");
- db.bar.insert({x: 1});
- assert.eq(1, db.bar.count());
+var db = m.getDB("foo");
+db.bar.insert({x: 1});
+assert.eq(1, db.bar.count());
- db.adminCommand({fsync: 1});
- var dbpathFiles = listFiles(dbpath);
- var files = dbpathFiles.filter(function(z) {
- return z.name.endsWith("/foo");
- });
- assert.eq(1, files.length, 'dbpath does not contain "foo" directory: ' + tojson(dbpathFiles));
+db.adminCommand({fsync: 1});
+var dbpathFiles = listFiles(dbpath);
+var files = dbpathFiles.filter(function(z) {
+ return z.name.endsWith("/foo");
+});
+assert.eq(1, files.length, 'dbpath does not contain "foo" directory: ' + tojson(dbpathFiles));
- files = listFiles(files[0].name);
- assert(files.length > 0);
+files = listFiles(files[0].name);
+assert(files.length > 0);
- MongoRunner.stopMongod(m);
+MongoRunner.stopMongod(m);
- // Subsequent attempt to start server using same dbpath without directoryperdb should fail.
- assert.isnull(MongoRunner.runMongod({dbpath: dbpath, restart: true}));
+// Subsequent attempt to start server using same dbpath without directoryperdb should fail.
+assert.isnull(MongoRunner.runMongod({dbpath: dbpath, restart: true}));
}());