Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packer_test: check for a panic during execution
When a command is run, it is the expectation that no test should make Packer panic. If it did, something is wrong and Packer should be fixed so it doesn't panic anymore in that situation. The way we did the check before was adding a PanicCheck after the command ran, so we could make sure of that during `Assert`. However, since we introduced the possibility to have multiple runs, having this addition as part of the run loop meant that the PanicCheck would be run as many times as there were runs. While this worked, this implied that we'd do the same check multiple times on a single command output, which is not optimal. Instead, this commit moves the check to within the `Run` function, this way for each run of the command we do the check once, and then we can assert the results of the command on what output it produced.
- Loading branch information