summaryrefslogtreecommitdiff
path: root/jstests/tool/tool1.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2013-10-30 17:17:16 -0400
committerBenety Goh <benety@mongodb.com>2013-11-01 14:24:04 -0400
commit6b7d6962a9c8836c54e678d3dddb297c3c76089c (patch)
treed0b17dbacfcaa8b6e69e85832745a1f45a4e60b9 /jstests/tool/tool1.js
parentb9b626c584b02ae607beaf16a2c0d748ceec98e4 (diff)
downloadmongo-6b7d6962a9c8836c54e678d3dddb297c3c76089c.tar.gz
SERVER-11462 use base name in tests where verifying filenames. also added base name to listFiles() result
Diffstat (limited to 'jstests/tool/tool1.js')
-rw-r--r--jstests/tool/tool1.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/tool/tool1.js b/jstests/tool/tool1.js
index 82a5963a8e7..8c463c8e1df 100644
--- a/jstests/tool/tool1.js
+++ b/jstests/tool/tool1.js
@@ -3,12 +3,13 @@
baseName = "jstests_tool_tool1";
dbPath = MongoRunner.dataPath + baseName + "/";
externalPath = MongoRunner.dataPath + baseName + "_external/";
-externalFile = externalPath + "export.json";
+externalBaseName = "export.json";
+externalFile = externalPath + externalBaseName;
function fileSize(){
var l = listFiles( externalPath );
for ( var i=0; i<l.length; i++ ){
- if ( l[i].name == externalFile )
+ if ( l[i].baseName == externalBaseName )
return l[i].size;
}
return -1;