Skip to content
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

[tmpnet] Add network reuse to e2e fixture #2935

Merged
merged 3 commits into from
Apr 17, 2024
Merged

Conversation

marun
Copy link
Contributor

@marun marun commented Apr 10, 2024

Why this should be merged

Previously, using an existing network with the e2e suite required starting the network with the tmpnetctl cli. This has been replaced with direct support for network reuse within the e2e fixture to better support testing of networks with subnets and remove the need for other repos (subnet-evm and hypersdk) to use tmpnetctl.

How this works

  • Replace the --use-existing-network flag with --reuse-network flag which will ensure that a suite-compatible network is started if not already running and reused if already running

    • network reuse is segmented by test suite by virtue of embedding the name of the network owner (e.g. avalanchego-e2e, subnet-evm-e2e) in the symlink enabling network reuse
  • Added the --stop-network flag to support stopping a network previously started by --reuse-network and exiting immediately without running tests.

tmpnetctl is left in place for now but its future is uncertain.

How this was tested

  • Updated the tests.e2e.existing.sh script to use the new flag instead of tmpnetctl

@marun marun self-assigned this Apr 10, 2024
@marun marun force-pushed the tmpnet-reuse branch 4 times, most recently from 30ddbc6 to 8233457 Compare April 10, 2024 20:21
@marun marun marked this pull request as ready for review April 10, 2024 20:21
@marun marun mentioned this pull request Apr 10, 2024
3 tasks
@marun marun added the testing This primarily focuses on testing label Apr 10, 2024
Previously, using an existing network with the e2e suite required
starting the network with the tmpnetctl cli. This has been replaced
with direct support for network reuse within the e2e fixture to better
support testing of networks with subnets and remove the need for
other repos (subnet-evm and hypersdk) to use tmpnetctl:

 - Replace the --use-existing-network flag with --reuse-network flag
 which will ensure that a suite-compatible network is started if
 not already running and reused if already running

 - Added the --stop-network flag to support stopping a network
 previously started by --reuse-network and exiting immediately without
 running tests.

tmpnetctl is left in place for now but its future is uncertain.
tests/fixture/e2e/env.go Outdated Show resolved Hide resolved
tests/fixture/e2e/env.go Outdated Show resolved Hide resolved
@StephenButtolph StephenButtolph added this to the v1.11.5 milestone Apr 17, 2024
marun and others added 2 commits April 17, 2024 13:20
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: marun <maru.newby@avalabs.org>
@StephenButtolph StephenButtolph added this pull request to the merge queue Apr 17, 2024
Merged via the queue into master with commit 6d8706e Apr 17, 2024
19 checks passed
@StephenButtolph StephenButtolph deleted the tmpnet-reuse branch April 17, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants