-
Notifications
You must be signed in to change notification settings - Fork 54
Refactor tests #400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Refactor tests #400
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e1373a9
test: refactor test_base
willcl-ark 2243454
test: refactor rpc_test
willcl-ark d9f63af
test: refactor scenarios_test
willcl-ark 27d8929
test: refactor v25_net_test
willcl-ark e7668cc
test: refactor ln_test
willcl-ark d3d8960
test: refactor build_branch_test
willcl-ark 360e4f2
test: refactor dag_connection_test
willcl-ark bf9227c
test: use debug log level in stream
willcl-ark 9c74e19
test: rename v25_net_test to onion_test
willcl-ark 6dab9f0
test: use logging.config in test_base
willcl-ark 7a9b687
fixup logging
willcl-ark bb2b11d
test: remove unavailable services
willcl-ark 57dfc9a
fixup services enum
willcl-ark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,16 +48,14 @@ def handle_sigterm(self, signum, frame): | |
|
|
||
| def setup(self): | ||
| signal.signal(signal.SIGTERM, self.handle_sigterm) | ||
|
|
||
| # Must setuup warnet first to avoid double formatting | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setuuuuuuup! |
||
| self.warnet = Warnet.from_network(self.options.network) | ||
| # hacked from _start_logging() | ||
| # Scenarios will log plain messages to stdout only, which will can redirected by warnet | ||
| self.log = logging.getLogger() | ||
| self.log = logging.getLogger("WarnetTestFramework") | ||
| self.log.setLevel(logging.INFO) # set this to DEBUG to see ALL RPC CALLS | ||
| ch = logging.StreamHandler(sys.stdout) | ||
| formatter = logging.Formatter(fmt="%(message)s") | ||
| ch.setFormatter(formatter) | ||
| self.log.addHandler(ch) | ||
|
|
||
| self.warnet = Warnet.from_network(self.options.network) | ||
| for i, tank in enumerate(self.warnet.tanks): | ||
| ip = tank.ipv4 | ||
| self.log.info(f"Adding TestNode {i} from tank {tank.index} with IP {ip}") | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer to leave out
|to save a bit more space, and limit(name)as well, i bet we can cap it at 8 chars and come up with short little nicknames for each module