Skip to content

Commit

Permalink
erc20 tests in a go routine
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Dec 21, 2023
1 parent 8f48ad7 commit 88fca01
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions contrib/localnet/orchestrator/smoketest/cmd/smoketest/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewLocalCmd() *cobra.Command {
)
cmd.Flags().Bool(
flagVerbose,
true,
false,
"set to true to enable verbose logging",
)
return cmd
Expand Down Expand Up @@ -122,30 +122,36 @@ func localSmokeTest(cmd *cobra.Command, _ []string) {
}

// run erc20 test
erc20Runner.DepositZeta()
erc20Runner.DepositEther()
erc20Runner.SetupBitcoinAccount()
//erc20Runner.DepositBTC()
erc20Runner.DepositERC20()
erc20Runner.CheckZRC20ReserveAndSupply()

// run erc20 test
if err := erc20Runner.RunSmokeTestsFromNames(
smoketests.AllSmokeTests,
smoketests.TestMultipleERC20DepositName,
smoketests.TestWithdrawERC20Name,
); err != nil {
panic(err)
}
go func() {
erc20Runner.WG.Add(1)
erc20Runner.DepositZeta()
erc20Runner.DepositEther()
erc20Runner.SetupBitcoinAccount()
//erc20Runner.DepositBTC()
erc20Runner.DepositERC20()
erc20Runner.CheckZRC20ReserveAndSupply()

// run erc20 test
if err := erc20Runner.RunSmokeTestsFromNames(
smoketests.AllSmokeTests,
smoketests.TestDepositAndCallRefundName,
smoketests.TestMultipleERC20DepositName,
smoketests.TestWithdrawERC20Name,
smoketests.TestMultipleWithdrawsName,
smoketests.TestPauseZRC20Name,
smoketests.TestERC20DepositAndCallRefundName,
smoketests.TestWhitelistERC20Name,
); err != nil {
panic(err)
}
erc20Runner.WG.Done()
}()

// deploy zevm swap and context apps
//logger.Print("⚙️ setting up ZEVM swap and context apps")
//sm.SetupZEVMSwapApp()
//sm.SetupContextApp()

// run all smoke tests
//sm.RunSmokeTests(smoketests.AllSmokeTests)

deployerRunner.WG.Wait()
erc20Runner.WG.Wait()
logger.Print("✅ smoke tests completed in %s", time.Since(testStartTime).String())
Expand Down

0 comments on commit 88fca01

Please sign in to comment.