Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Dec 11, 2024
1 parent e3b840f commit 646a7d2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
4 changes: 2 additions & 2 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func NewLocalCmd() *cobra.Command {
cmd.Flags().Bool(flagContractsDeployed, false, "set to to true if running tests again with existing state")
cmd.Flags().Int64(flagWaitForHeight, 0, "block height for tests to begin, ex. --wait-for 100")
cmd.Flags().String(FlagConfigFile, "", "config file to use for the tests")
cmd.Flags().Bool(flagVerbose, true, "set to true to enable verbose logging")
cmd.Flags().Bool(flagVerbose, false, "set to true to enable verbose logging")
cmd.Flags().Bool(flagTestAdmin, false, "set to true to run admin tests")
cmd.Flags().Bool(flagTestPerformance, false, "set to true to run performance tests")
cmd.Flags().Bool(flagTestSolana, false, "set to true to run solana tests")
Expand Down Expand Up @@ -124,7 +124,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
}

if testPerformance {
logger.Print("⚠️ performance tests enabled, not related tests will be skipped")
logger.Print("⚠️ performance tests enabled, regular tests will be skipped")
skipRegular = true
skipPrecompiles = true
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_stress_solana_deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestStressSolanaDeposit(r *runner.E2ERunner, args []string) {

require.NoError(r, eg.Wait())

r.Logger.Print("all deposits completed")
r.Logger.Print("all SOL deposits completed")
}

// monitorDeposit monitors the deposit of SOL/SPL, returns once the deposit is complete
Expand Down
11 changes: 1 addition & 10 deletions e2e/e2etests/test_stress_solana_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"sync"
"time"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/montanaflynn/stats"
"github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup"
Expand All @@ -16,21 +15,13 @@ import (
crosschaintypes "github.com/zeta-chain/node/x/crosschain/types"
)

// TestStressSolanaWithdraw tests the stressing withdrawal of SOL/SPL
// TestStressSolanaWithdraw tests the stressing withdrawal of SOL
func TestStressSolanaWithdraw(r *runner.E2ERunner, args []string) {
require.Len(r, args, 2)

withdrawSOLAmount := utils.ParseBigInt(r, args[0])
numWithdrawalsSOL := utils.ParseInt(r, args[1])

balanceBefore, err := r.SOLZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress())
require.NoError(r, err)
r.Logger.Info("runner balance of SOL before withdraw: %s", balanceBefore.String())

balanceBefore, err = r.SPLZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress())
require.NoError(r, err)
r.Logger.Info("runner balance of SPL before withdraw: %s", balanceBefore.String())

// load deployer private key
privKey := r.GetSolanaPrivKey()

Expand Down
2 changes: 1 addition & 1 deletion e2e/e2etests/test_stress_spl_deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ func TestStressSPLDeposit(r *runner.E2ERunner, args []string) {

require.NoError(r, eg.Wait())

r.Logger.Print("all deposits completed")
r.Logger.Print("all SPL deposits completed")
}
11 changes: 1 addition & 10 deletions e2e/e2etests/test_stress_spl_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"sync"
"time"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/montanaflynn/stats"
"github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup"
Expand All @@ -16,21 +15,13 @@ import (
crosschaintypes "github.com/zeta-chain/node/x/crosschain/types"
)

// TestStressSPLWithdraw tests the stressing withdrawal of SOL/SPL
// TestStressSPLWithdraw tests the stressing withdrawal of SPL
func TestStressSPLWithdraw(r *runner.E2ERunner, args []string) {
require.Len(r, args, 2)

withdrawSPLAmount := utils.ParseBigInt(r, args[0])
numWithdrawalsSPL := utils.ParseInt(r, args[1])

balanceBefore, err := r.SOLZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress())
require.NoError(r, err)
r.Logger.Info("runner balance of SOL before withdraw: %s", balanceBefore.String())

balanceBefore, err = r.SPLZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress())
require.NoError(r, err)
r.Logger.Info("runner balance of SPL before withdraw: %s", balanceBefore.String())

// load deployer private key
privKey := r.GetSolanaPrivKey()

Expand Down

0 comments on commit 646a7d2

Please sign in to comment.