This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
test-utils: programatically spawn dev nodes #14704
Merged
paritytech-processbot
merged 17 commits into
master
from
liam-enable-spinning-up-dev-node-without-binary
Aug 8, 2023
Merged
test-utils: programatically spawn dev nodes #14704
paritytech-processbot
merged 17 commits into
master
from
liam-enable-spinning-up-dev-node-without-binary
Aug 8, 2023
Conversation
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
liamaharon
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
labels
Aug 3, 2023
16 tasks
liamaharon
commented
Aug 3, 2023
liamaharon
changed the title
node-template: enable programatically spawning dev nodes in external projects
node-template: enable programatically spawning dev nodes
Aug 3, 2023
sam0x17
approved these changes
Aug 8, 2023
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.
Yeah I stand by this being a very sound approach. Any good CLI app exposes both a binary and a lib that allows you to easily use its underlying functionality, lest people write horrible zombies of wrappers around binaries around wrappers around binaries.
Since all this exposes is the same functionality exposed by the CLI interface itself, this is a zero-risk net positive 💯
lexnv
reviewed
Aug 8, 2023
lexnv
reviewed
Aug 8, 2023
lexnv
reviewed
Aug 8, 2023
lexnv
approved these changes
Aug 8, 2023
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
This reverts commit e18677f.
ggwpez
reviewed
Aug 8, 2023
liamaharon
changed the title
node-template: enable programatically spawning dev nodes
test-utils: programatically spawn dev nodes
Aug 8, 2023
bot merge force |
paritytech-processbot
bot
deleted the
liam-enable-spinning-up-dev-node-without-binary
branch
August 8, 2023 11:53
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
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.
I am in the process of migrating
try-runtime-cli
into an independent repo (paritytech/try-runtime-cli#6).Multiple
try-runtime-cli
tests usesubstrate_cli_test_utils::start_node
to spawn a node to run commands against.Unfortunately,
substrate_cli_test_utils::start_node
depends on thesubstrate-node
binary being accessible bycargo_bin
(callscargo_bin("substrate-node")
), which is not the case outside ofsubstrate
.In this PR I create a new method
substrate_cli_test_utils::start_node_inline
.The new method functions similarly to
start_node
, but can be run in environments without the ability to access a node binary withcargo_bin("substrate-node")
.Honestly I am not sure if this is the best approach to solving this problem, I'm open to other suggestions if there're better ones.