-
Notifications
You must be signed in to change notification settings - Fork 54
connect_nodes - account for test networks
#385
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
connect_nodes - account for test networks
#385
Conversation
|
Updated with simplified tank index extraction logic. I also took a moment to pull clarify the connect dag scenario by using a function to make assertions. This makes it easier to add new assertions such as for nodes 8 and 9. |
pinheadmz
left a comment
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.
Looking at this again, I think the entire connect_dag scenario should just be a test, or can be copied into dag_connection_test. It is written very specifically for one graph file and is full of assert statements. Its not like the other scenarios that are written more generically and can apply to a broad range of graphs.
I like this idea, but I don't think we have easy access to |
oh right i forgot we were going back and forth about using a scenario just for testing, hmmmmmm. It still feels anti-pattern to have the asserts in a scenario instead of a test, but then it also will be silly to split up the One way this might make more sense, and im not married to this but lets just jam on it a sec:
this makes a bit more sense to me because first of all i dont think we cover that particular rpc in any test, and second of all it demonstrates using a "custom" scenario that is written for a specific graph and not intended for general applications |
b064b0f to
b1418e8
Compare
|
I like your thinking about splitting In terms of specifics:
I'm fine with test/data. However, I think it would be even better to make a folder called "warnet_test_framework_files" or "tank_tests" or similar. That way, this area would be where we place test files that specifically use the test framework/tank features and are not simply files containing plain data.
I like keeping the edit: Just to clarify, I also don't think we can move the asserts into the TestBase test b/c of the need to work with Tanks directly.
This sounds like it will work and I like it. |
|
@pinheadmz I moved the scenario file and incorporated run-file as discussed. |
pinheadmz
left a comment
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.
👍 OKIE DOKE!
simplifying get_peer_ip
Also, add assertion for pre-connected nodes
52a8031 to
cae9923
Compare
|
@pinheadmz I updated the wording on that final log entry. LGTM |
Issue
Sometimes
connect_nodesproduces an error:Cause
connect_nodesdoes not handle test networks properly. Specifically, it handles this dns format:NETWORK-tank-INDEX-serviceBut not the "test" format:
NETWORK-test-TEST-tank-INDEX-serviceSolution
Modify
connect_nodesto handle the "test" format, and update the test coverage to account for this.