-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#18441 from manadart/dqlite-skip-factory-tests…
…-auth juju#18441 This patch demonstrates a strategy we will pursue to remove use of the testing factory. This is a strategic approach to avoid being bound to convolutions of the factory for making tests pass as we move large concerns over to Dqlite. The reasons for it are: - The tests are integration (not unit) tests anyway, and most of their usage is in the API server, which should increasingly rely on mocked domain services. - The approach so far to the factory has been piece-meal double-writing that often turns out not to be fit for purpose anyway. - The factory is already of sufficient complexity that it makes tests based on it hard to understand. Here, we apply the approach to API server authentication tests. **This technique should be recruited consistently in every application of this strategy henceforth.** - Add a new test (`TestStub` in this case) with a `c.Skip` call. - The text of the skip message should include a bullet list of required coverage to fill in. - Each list item must contain as much prose as necessary to describe the scenarios requiring implementation. By doing this we ensure that test reports will emit a reminder of missing coverage. The coverage will be re-established as we move on the the relevant domain concerns. Backlogs will include both activities like the one performed here to remove/document the coverage, and to add the coverage back in.
- Loading branch information
Showing
3 changed files
with
45 additions
and
251 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