diff options
Diffstat (limited to 'jstests/core/dbstats.js')
-rw-r--r-- | jstests/core/dbstats.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/core/dbstats.js b/jstests/core/dbstats.js index dff5e370702..76d77f29b5b 100644 --- a/jstests/core/dbstats.js +++ b/jstests/core/dbstats.js @@ -2,7 +2,7 @@ // // @tags: [ // requires_dbstats, -// requires_fcv_47, +// requires_fcv_50 // ] (function() { @@ -34,7 +34,7 @@ const doc = { }; assert.commandWorked(coll.insert(doc)); -let dbStats = testDB.runCommand({dbStats: 1}); +let dbStats = testDB.runCommand({dbStats: 1, freeStorage: 1}); assert.commandWorked(dbStats); assert.eq(1, dbStats.objects, tojson(dbStats)); // Includes testColl only @@ -61,6 +61,13 @@ if (isUsingPersistentStorage) { assert(dbStats.hasOwnProperty("fsUsedSize"), tojson(dbStats)); assert(dbStats.hasOwnProperty("fsTotalSize"), tojson(dbStats)); + + // Make sure free storage size is not included by default + const defaultStats = testDB.runCommand({dbStats: 1}); + assert.commandWorked(defaultStats); + assert(!defaultStats.hasOwnProperty("freeStorageSize"), tojson(defaultStats)); + assert(!defaultStats.hasOwnProperty("indexFreeStorageSize"), tojson(defaultStats)); + assert(!defaultStats.hasOwnProperty("totalFreeStorageSize"), tojson(defaultStats)); } // Confirm collection and view counts on mongoD |