Skip to content

Commit

Permalink
log total spend required for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pirtleshell committed Jun 30, 2023
1 parent 1640624 commit e8a4cc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/e2e/testutil/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (a *SigningAccount) SignAndBroadcastEvmTx(req util.EvmTxRequest) EvmTxRespo
}

// if we don't have a tx receipt within a given timeout, fail the request
a.l.Printf("awaiting evm tx receipt for tx %s\n", res.TxHash)
response.Receipt, response.Err = util.WaitForEvmTxReceipt(a.evmSigner.EvmClient, res.TxHash, 10*time.Second)

return response
Expand Down
10 changes: 9 additions & 1 deletion tests/e2e/testutil/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,21 @@ func (suite *E2eTestSuite) SetupSuite() {
func (suite *E2eTestSuite) TearDownSuite() {
fmt.Println("tearing down test suite.")

whale := suite.Kava.GetAccount(FundedAccountName)

if suite.enableRefunds {
suite.cost.sdkBalanceAfter = suite.Kava.QuerySdkForBalances(whale.SdkAddress)
suite.cost.erc20BalanceAfter = suite.Kava.GetErc20Balance(suite.DeployedErc20.Address, whale.EvmAddress)
fmt.Println("==BEFORE REFUNDS==")
fmt.Println(suite.cost)

fmt.Println("attempting to return all unused funds")
suite.Kava.ReturnAllFunds()

fmt.Println("==AFTER REFUNDS==")
}

// calculate & output cost summary for funded account
whale := suite.Kava.GetAccount(FundedAccountName)
suite.cost.sdkBalanceAfter = suite.Kava.QuerySdkForBalances(whale.SdkAddress)
suite.cost.erc20BalanceAfter = suite.Kava.GetErc20Balance(suite.DeployedErc20.Address, whale.EvmAddress)
fmt.Println(suite.cost)
Expand Down

0 comments on commit e8a4cc7

Please sign in to comment.