Skip to content

Commit

Permalink
add upgrade call
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Sep 25, 2024
1 parent b389626 commit d778157
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14,452 deletions.
8 changes: 8 additions & 0 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const (
flagTestV2Migration = "test-v2-migration"
flagSkipTrackerCheck = "skip-tracker-check"
flagSkipPrecompiles = "skip-precompiles"
flagUpgradeGateways = "upgrade-gateways"
)

var (
Expand Down Expand Up @@ -83,6 +84,7 @@ func NewLocalCmd() *cobra.Command {
cmd.Flags().Bool(flagTestV2Migration, false, "set to true to run tests for v2 contracts migration test")
cmd.Flags().Bool(flagSkipTrackerCheck, false, "set to true to skip tracker check at the end of the tests")
cmd.Flags().Bool(flagSkipPrecompiles, false, "set to true to skip stateful precompiled contracts test")
cmd.Flags().Bool(flagUpgradeGateways, false, "set to true to upgrade gateways during setup for ZEVM and EVM")

return cmd
}
Expand Down Expand Up @@ -112,6 +114,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
testV2 = must(cmd.Flags().GetBool(flagTestV2))
testV2Migration = must(cmd.Flags().GetBool(flagTestV2Migration))
skipPrecompiles = must(cmd.Flags().GetBool(flagSkipPrecompiles))
upgradeGateways = must(cmd.Flags().GetBool(flagUpgradeGateways))
)

logger := runner.NewLogger(verbose, color.FgWhite, "setup")
Expand Down Expand Up @@ -407,6 +410,11 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
deployerRunner.UpdateChainParamsV2Contracts()
}

// upgrade gateways
if upgradeGateways {

Check failure on line 414 in cmd/zetae2e/local/local.go

View workflow job for this annotation

GitHub Actions / lint

empty-block: this block is empty, you can remove it (revive)
//deployerRunner.UpgradeGateways()
}

if testV2 || testV2Migration {
startV2Tests(&eg, conf, deployerRunner, verbose)
}
Expand Down
4 changes: 2 additions & 2 deletions contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then
# When the upgrade height is greater than 100 for upgrade test, the Bitcoin tests have been run once, therefore the Bitcoin wallet is already set up
# Use light flag to skip advanced tests
if [ "$UPGRADE_HEIGHT" -lt 100 ]; then
zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --light ${COMMON_ARGS}
zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --light --upgrade-gateways ${COMMON_ARGS}
else
zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --skip-bitcoin-setup --light ${COMMON_ARGS}
zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --skip-bitcoin-setup --light --upgrade-gateways ${COMMON_ARGS}
fi

ZETAE2E_EXIT_CODE=$?
Expand Down
Loading

0 comments on commit d778157

Please sign in to comment.