Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
2015-01 Iteration
Description
Going to try and organize the most common failure cases and make sure they make sense for each tool. Feel free to edit this description for more test cases:
bsondump
1. no bson file specified – good
2. invalid options – good
3. pointed to a non-bson file – bson files do not have a special header so there's no nicer way to determine its invalid than just going for it.
mongodump
1. unreachable db – good
2. invalid options – good
3. auth error – good
4. broken pipe – can get EOF
5. can't use repair cursor – good
mongorestore
1. unreachable db – good
2. invalid options – good
3. bad dump folder / no dump folder – could provide some kind of troubleshooting info. Overly verbose as it is.
4. restoring without drop – hammers you with errors, but I'm not sure if there is a good way around this
mongoexport
1. invalid options – good
2. broken pipe – sometimes gives "EOF"
mongoimport
1. bad headers – "2015-01-09T16:55:59.466-0500 Failed: incompatible fields found: 'a' and 'a.c'" could be more didactic
2. invalid input – good
3. no collection – prints 4 lines and assumes "" as the collection, which is a bit odd to read.
mongotop/mongostat
1. unreachable db – in mongotop, specifying a nonexistent hostname will result with: error determining if connected to mongos: error connecting to db server: no reachable servers
2. broken pipe (EOF?) – handled decently well