Adding localnetwork e2e tests: start\status\clean#2784
Adding localnetwork e2e tests: start\status\clean#2784
Conversation
artemanosov
left a comment
There was a problem hiding this comment.
LGTM but would refactor to use new testing function
| ginkgo.AfterEach(func() { | ||
| _, _ = commands.CleanNetwork() | ||
| }) | ||
|
|
There was a problem hiding this comment.
can we add tests for these flags too
cmd.Flags().StringVar(
&startFlags.UserProvidedAvagoVersion,
"avalanchego-version",
constants.DefaultAvalancheGoVersion,
"use this version of avalanchego (ex: v1.17.12)",
)
cmd.Flags().StringVar(&startFlags.AvagoBinaryPath, "avalanchego-path", "", "use this avalanchego binary path")
cmd.Flags().StringVar(&startFlags.RelayerBinaryPath, "relayer-path", "", "use this relayer binary path")
cmd.Flags().StringVar(&startFlags.SnapshotName, "snapshot-name", constants.DefaultSnapshotName, "name of snapshot to use to start the network from")
cmd.Flags().StringVar(
&startFlags.RelayerVersion,
"relayer-version",
constants.DefaultRelayerVersion,
"use this relayer version",
)
There was a problem hiding this comment.
For relayer related tests, feel free to create issue for it / if you want to pick it up, @felipemadero can give more context
There was a problem hiding this comment.
ok i just created a ticket for it: https://ava-labs.atlassian.net/browse/DPTN-1665 - will address it in a follow-up PR
There was a problem hiding this comment.
what about the other flags;
cmd.Flags().StringVar(
&startFlags.UserProvidedAvagoVersion,
"avalanchego-version",
constants.DefaultAvalancheGoVersion,
"use this version of avalanchego (ex: v1.17.12)",
)
cmd.Flags().StringVar(&startFlags.AvagoBinaryPath, "avalanchego-path", "", "use this avalanchego binary path")
cmd.Flags().StringVar(&startFlags.SnapshotName, "snapshot-name", constants.DefaultSnapshotName, "name of snapshot to use to start the network from")
6e94b79 to
cbaf8a2
Compare
| gomega.Expect(err).Should(gomega.BeNil()) | ||
| gomega.Expect(out).Should(gomega.ContainSubstring("Network is Up")) | ||
| }) | ||
| }) |
There was a problem hiding this comment.
you need to add tests for starting from a stopped cluster. most important test
consideration is that the state is preserved. eg:
start with N nodes -> stop -> start with no args-> the same N is obtained
and check that L1s are started, blockchain deploy -> stop -> start -> the L1s are up and running
There was a problem hiding this comment.
also check for start with different snapshot names, and see that:
- it does not modify or create a default snapshot
- stop only restores that state if given that snapshot name
also, clean only affects the default snapshot, no other snapshots
all the snapshots semantic may be well tested in this commands, together with stop
| }) | ||
|
|
||
| ginkgo.It("can get status of started network", func() { | ||
| out := commands.StartNetwork() |
There was a problem hiding this comment.
can you check the status is current for different network configurations, and for deployed L1s?
| var _ = ginkgo.Describe("[Local Network] Stop", ginkgo.Ordered, func() { | ||
| ginkgo.AfterEach(func() { | ||
| commands.CleanNetwork() | ||
| _, _ = commands.CleanNetwork() |
There was a problem hiding this comment.
I should add here a test case for stopping a locally deployed L1. it should both stop the network and
the L1s
780d920 to
7a6e648
Compare
78f3e1d to
9f8b08e
Compare
0a78c42 to
a1a9cfc
Compare
b810447 to
ab9cc87
Compare
ab9cc87 to
2f2bf94
Compare
2f2bf94 to
8716cb3
Compare
9f6828a to
32f76ea
Compare
32f76ea to
68c727a
Compare
|
Closing as CLI is moving into maintenance mode. Thanks for the work on this! |
Why this should be merged
https://ava-labs.atlassian.net/browse/DPTN-1625
https://ava-labs.atlassian.net/browse/DPTN-1626
https://ava-labs.atlassian.net/browse/DPTN-1627
How this works
How this was tested
Code Coverage Enhancement: