-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In this commit we are accomplishing two things: 1. We are making contract tests failures more robust by moving container instantiation into class methods so that if they fail, cleanup logic can be run (clean up logic moved from `tearDownClass` to `addClassCleanup`, which according to the docs means that it will actually run even if `setUpClass` fails). We also added try-catch blocks to ensure all logic attempts to run (e.g. if mock_collector fails to start, we still remove the network). These changes prevent things like lost containers/network buildup. 2. We are adding support for "dependency containers". Future contract tests depend on having another container running (e.g a dependency container), and adding the `set_up_dependency_container` and `tear_down_dependency_container` methods allow this to be done easily and correctly. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
Showing
2 changed files
with
70 additions
and
38 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