Each golden file filename is in the format: * status-cmd line.txt * status[confirm_prompt:prompt]-cmd line.txt * status[command_execute:command]-cmd line.txt Command line is mangled with `_` -> `/`, and then `pg/dump` -> `pg_dump`. It was substantial work to set up the necessary mocking of ids to get consistent output. If the golden files spec fails, it tells you were you can see the differences, and it doesn't delete the recorded files from spec/routes/api/cli/spec-output-files, so if you are updating and the changes are expected, you can copy the files to spec/routes/api/cli/golden-files and commit them. This handles all cli commands, and most commands tests both the success and failure cases. The pg failover success case is not tested as that needs special setup.
747 B
747 B