-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: handle warnings generated by our own tests (#1469)
Our tests currently end with a very large list of warnings. This PR fixes that: * All of the Harness tests emit a `PendingDeprecationWarning` telling us that Harness is going away and we should use Scenario. This seems like something to simply ignore in our own tests, so I've added a `-W` argument to Python to silence them in bulk. * One `test_main` test raises a warning about controller storage going away - there's another test that tests that warning happens, and the two tests are otherwise identical. I've merged the two - we don't need them both. * Two of the secret tests check that `SecretInfo` objects can still be created without providing the model UUID. I've added a `pytest.warns` to (a) ensure that there's the warning, and (b) stop it appearing in the tox output. * Scenario should provide the model UUID when creating `SecretInfo` objects. This is a one-line fix, so I've added it here - it stops deprecation warnings, but is really more the code than the tests, but since it's so small I think it's ok here. * The `context.on` Scenario tests check that pre- and post- series upgrade events work, and those raise warnings. I've split them off to a separate test that verifies (and silences) the warning. Fixes #1408
- Loading branch information
1 parent
4e856c9
commit df856d2
Showing
5 changed files
with
26 additions
and
11 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