-
Notifications
You must be signed in to change notification settings - Fork 96
Deploy flags e2e #2788
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
base: remove-use-local-nodes
Are you sure you want to change the base?
Deploy flags e2e #2788
Conversation
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
… into deploy-flags-e2e2
@@ -396,7 +396,7 @@ func DeploySubnetLocallyWithArgsSOV(subnetName string, version string, confPath | |||
gomega.Expect(exists).Should(gomega.BeTrue()) | |||
|
|||
// Deploy subnet locally | |||
cmdArgs := []string{SubnetCmd, "deploy", "--local", subnetName, "--" + constants.SkipUpdateFlag, bootstrapFilepathFlag + "=" + utils.BootstrapValidatorPath} | |||
cmdArgs := []string{SubnetCmd, "deploy", "--local", subnetName, "--" + constants.SkipUpdateFlag} |
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.
Since now using bootstrapFilepathFlag
flag -> convert only & no local machine spun up, this flag will be removed in existing e2e blockchain deploy
tests
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.
bootstrapFilepathFlag
is now tested in tests/e2e/commandse2e/blockchain/deploy/suite.go
@@ -476,10 +487,31 @@ func deployBlockchain(cmd *cobra.Command, args []string) error { | |||
return err | |||
} | |||
} | |||
if generateNodeID || bootstrapValidatorsJSONFilePath != "" || bootstrapEndpoints != nil { |
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.
A big change for blockchain deploy command
in this PR:
if generateNodeID
, bootstrapValidatorsJSONFilePath
or bootstrapEndpoints
flag is used, blockchain deploy will not use local machine and convert only will be set to true
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.
Currently we always spin up local machine even if bootstrapValidatorsJSONFilePath
or generateNodeID
is used, but this shouldn't be the case because the bootstrap validators defined in bootstrapValidatorsJSONFilePath or generateNodeID are not synced to the blockchain after convert step.
It should be either:
- users only use all local machines as bootstrap validators in deploy or
- users only use validators defined in generateNodeID, bootstrapValidatorsJSONFilePath or bootstrapEndpoints flags as bootstrap validators
We should not mix them
gomega.Expect(output).ShouldNot(gomega.ContainSubstring("L1 is successfully deployed on Local Network")) | ||
gomega.Expect(err).Should(gomega.BeNil()) | ||
}) | ||
|
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.
not testing bootstrap endpoint because we are already testing it in etna test suite
gomega.Expect(output).Should(gomega.ContainSubstring("cannot use local machine as bootstrap validator if --generate-node-id=true")) | ||
}) | ||
|
||
ginkgo.It("ERROR PATH: bootstrap filepath is not applicable if convert only is false", func() { |
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.
I would probably group the ERROR PATH and HAPPY PATH into ginkgo.Context() so you don't need to write it for every test
LGTM, but I won't stamp until @felipemadero review, since he's more familiar with the command |
Blockchain Deploy E2E
Our current E2E for tests/e2e/testcases is pretty extensive for local network across all commands. However, it does not test flags input extensively for happy path and error path.
For example, our E2E tests for blockchain deploy in
https://github.com/ava-labs/avalanche-cli/blob/main/tests/e2e/testcases/subnet/sov/
currently tests that we are able to deploy to local network using PoA / PoS / Initialize Validator Manager. However, it does not test the multiple ways that we can achieve each objectives (for example we can use deploy an L1 with by settingnum-local-machine=2
instead of using default value of 1).This PR tests
blockchain deploy
flags extensively, checking for both happy path and error path.Closes #2791, #2796