Skip to content

Commit

Permalink
fix parts of e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Nov 22, 2024
1 parent ffbd1f5 commit 1f1f1ca
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/networkcmd/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func TrackSubnet(
networkInfo.RPCEndpoints = rpcEndpoints.List()
networkInfo.WSEndpoints = wsEndpoints.List()
for _, rpcURL := range networkInfo.RPCEndpoints {
ux.Logger.PrintToUser("Waiting for rpc %s to be available", rpcURL)
ux.Logger.PrintToUser("Waiting for %s to be available", rpcURL)
if err := evm.WaitForRPC(ctx, rpcURL); err != nil {
return err
}
Expand Down
79 changes: 79 additions & 0 deletions tests/e2e/assets/test_subnet_evm_poa_genesis.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/e2e/commands/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ func DeploySubnetLocallyWithArgsSOV(subnetName string, version string, confPath
if debugAvalanchegoPath != "" {
cmdArgs = append(cmdArgs, "--avalanchego-path", debugAvalanchegoPath)
}
cmdArgs = append(cmdArgs, "--avalanchego-path", utils.EtnaAvalancheGoBinaryPath)
cmd := exec.Command(CLIBinary, cmdArgs...)
output, err := cmd.CombinedOutput()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/testcases/network/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var _ = ginkgo.Describe("[Network]", ginkgo.Ordered, func() {
})

ginkgo.It("can stop and restart a deployed subnet SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)
deployOutput := commands.DeploySubnetLocallySOV(subnetName)
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand Down Expand Up @@ -164,7 +164,7 @@ var _ = ginkgo.Describe("[Network]", ginkgo.Ordered, func() {
})

ginkgo.It("clean hard deletes plugin binaries SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)
deployOutput := commands.DeploySubnetLocallySOV(subnetName)
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/testcases/packageman/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var _ = ginkgo.Describe("[Package Management]", ginkgo.Ordered, func() {
gomega.Expect(utils.CheckSubnetEVMExists(binaryToVersion[utils.SoloSubnetEVMKey1])).Should(gomega.BeFalse())
gomega.Expect(utils.CheckAvalancheGoExists(binaryToVersion[utils.SoloAvagoKey])).Should(gomega.BeFalse())

commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPath, binaryToVersion[utils.SoloSubnetEVMKey1])
commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPoaPath, binaryToVersion[utils.SoloSubnetEVMKey1])
deployOutput := commands.DeploySubnetLocallyWithVersionSOV(subnetName, binaryToVersion[utils.SoloAvagoKey])
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand Down Expand Up @@ -145,7 +145,7 @@ var _ = ginkgo.Describe("[Package Management]", ginkgo.Ordered, func() {
gomega.Expect(utils.CheckSubnetEVMExists(binaryToVersion[utils.SoloSubnetEVMKey1])).Should(gomega.BeFalse())
gomega.Expect(utils.CheckSubnetEVMExists(binaryToVersion[utils.SoloSubnetEVMKey2])).Should(gomega.BeFalse())

commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPath, binaryToVersion[utils.SoloSubnetEVMKey1])
commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPoaPath, binaryToVersion[utils.SoloSubnetEVMKey1])
commands.CreateSubnetEvmConfigWithVersionSOV(secondSubnetName, utils.SubnetEvmGenesis2Path, binaryToVersion[utils.SoloSubnetEVMKey2])

deployOutput := commands.DeploySubnetLocallySOV(subnetName)
Expand Down Expand Up @@ -250,7 +250,7 @@ var _ = ginkgo.Describe("[Package Management]", ginkgo.Ordered, func() {
gomega.Expect(utils.CheckAvalancheGoExists(binaryToVersion[utils.MultiAvago1Key])).Should(gomega.BeFalse())
gomega.Expect(utils.CheckAvalancheGoExists(binaryToVersion[utils.MultiAvago2Key])).Should(gomega.BeFalse())

commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPath, binaryToVersion[utils.MultiAvagoSubnetEVMKey])
commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPoaPath, binaryToVersion[utils.MultiAvagoSubnetEVMKey])
deployOutput := commands.DeploySubnetLocallyWithVersionSOV(subnetName, binaryToVersion[utils.MultiAvago1Key])
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand Down
18 changes: 9 additions & 9 deletions tests/e2e/testcases/subnet/sov/local/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
ginkgo.It("can deploy a custom vm subnet to local SOV", func() {
customVMPath, err := utils.DownloadCustomVMBin(mapping[utils.SoloSubnetEVMKey1])
gomega.Expect(err).Should(gomega.BeNil())
commands.CreateCustomVMConfigSOV(subnetName, utils.SubnetEvmGenesisPath, customVMPath)
commands.CreateCustomVMConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath, customVMPath)
deployOutput := commands.DeploySubnetLocallyWithVersionSOV(subnetName, mapping[utils.SoloAvagoKey])
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand All @@ -80,7 +80,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
})

ginkgo.It("can deploy a SubnetEvm subnet to local SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)
deployOutput := commands.DeploySubnetLocallySOV(subnetName)
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand All @@ -100,7 +100,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
})

ginkgo.It("can load viper config and setup node properties for local deploy SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)
deployOutput := commands.DeploySubnetLocallyWithViperConfSOV(subnetName, confPath)
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand All @@ -115,7 +115,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
})

ginkgo.It("can't deploy the same subnet twice to local SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)

deployOutput := commands.DeploySubnetLocallySOV(subnetName)
fmt.Println(deployOutput)
Expand All @@ -139,7 +139,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
})

ginkgo.It("can deploy multiple subnets to local SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)
commands.CreateSubnetEvmConfigSOV(secondSubnetName, utils.SubnetEvmGenesis2Path)

deployOutput := commands.DeploySubnetLocallySOV(subnetName)
Expand Down Expand Up @@ -220,7 +220,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
})

ginkgo.It("can deploy with custom per chain config node SOV", func() {
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)

// create per node chain config
nodesRPCTxFeeCap := map[string]string{
Expand Down Expand Up @@ -287,7 +287,7 @@ var _ = ginkgo.Describe("[Local Subnet SOV]", ginkgo.Ordered, func() {
"NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg",
}

commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPath)
commands.CreateSubnetEvmConfigSOV(subnetName, utils.SubnetEvmGenesisPoaPath)
deployOutput := commands.DeploySubnetLocallySOV(subnetName)
_, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand Down Expand Up @@ -323,7 +323,7 @@ var _ = ginkgo.Describe("[Subnet Compatibility]", func() {
ginkgo.It("can deploy a subnet-evm with old version", func() {
subnetEVMVersion := "v0.6.9"

commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPath, subnetEVMVersion)
commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPoaPath, subnetEVMVersion)
deployOutput := commands.DeploySubnetLocallySOV(subnetName)
rpcs, err := utils.ParseRPCsFromOutput(deployOutput)
if err != nil {
Expand All @@ -347,7 +347,7 @@ var _ = ginkgo.Describe("[Subnet Compatibility]", func() {
subnetEVMVersion1 := "v0.6.9"
subnetEVMVersion2 := "v0.6.8"

commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPath, subnetEVMVersion1)
commands.CreateSubnetEvmConfigWithVersionSOV(subnetName, utils.SubnetEvmGenesisPoaPath, subnetEVMVersion1)
commands.CreateSubnetEvmConfigWithVersionSOV(secondSubnetName, utils.SubnetEvmGenesis2Path, subnetEVMVersion2)

deployOutput := commands.DeploySubnetLocallySOV(subnetName)
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/utils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (
LatestAvago2EVMKey = "latestAvago2EVM"
OnlyAvagoValue = "latest"

SubnetEvmGenesisPoaPath = "tests/e2e/assets/test_subnet_evm_poa_genesis.json"
SubnetEvmGenesisPath = "tests/e2e/assets/test_subnet_evm_genesis.json"
SubnetEvmGenesis2Path = "tests/e2e/assets/test_subnet_evm_genesis_2.json"
EwoqKeyPath = "tests/e2e/assets/ewoq_key.pk"
Expand Down

0 comments on commit 1f1f1ca

Please sign in to comment.