Ideally a functional jstest which runs the shell with various input on stdin, and confirms that afterwards the contents of the .dbshell history file are as expected. The existing noPassthrough/shell_history.js test already does some of this, and so could perhaps be extended.
Alternatively, if that ends up being too difficult or complex, then unit testing of the linenoiseHistorySave and linenoiseHistoryLoad functions might be sufficient.
- related to
-
SERVER-26489 mongo shell no longer records history of commands
- Closed
-
SERVER-26871 Fix shell history file error handling
- Closed