-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixtures: Change default
use_subprocess=False
for run_cli_command
The `run_cli_command` fixture was updated a few commits ago to allow running the command as a subprocess instead of through the test runner. The reason is that the test runner does not execute the exact same pathway as when run as a subprocess and this was hiding subtle bugs. Specifically, a bug in the `PsqlDosBackend` where changes made by a CLI command were not automatically persisted to the database, was not caught by the tests since when running in the test runner the assertions do not explicitly check that changes are persisted, just that they are present, even if just in memory. Ideally, all tests are run with `use_subprocess=True`, which was set as the default originally, but unfortunately this is quite a deal slower than running with the test runner and would make the test suite almost 30 minutes slower. Instead, the tests that failed because of the storage backend bug are now explicitly marked as using `use_subprocess=True` and the default is changed. This now guarantees that at least these tests that are known to depend on the subprocess pathway are properly run in that way. This should provide greater coverage to prevent these types of bugs in the future. An exception is made for the tests of `verdi process list` and a number of subcommands of `verdi data` (mostly the list command but also some of the import and export commands. The reason is that all of the commands failed for the same reason: the group that was created in the setup of the test, was not persisted and so not found when the command was run in a subprocess. Since these tests are numerous and take multiple minutes to run, and the same behavior is already explicitly tested in the `verdi group` tests, they are run with `use_subprocess=False` to prevent the test suite from taking too much time.
- Loading branch information
Showing
8 changed files
with
83 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.