Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: move btc revertAddress test to advanced group to avoid upgrade test failure #3205

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

## Unreleased

### Features

### Tests

* [3204](https://github.com/zeta-chain/node/issues/3204) - move Bitcoin revert address test to advanced group to avoid upgrade test failure

### Refactor

### Fixes

## v23.0.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
e2etests.TestBitcoinStdMemoDepositName,
e2etests.TestBitcoinStdMemoDepositAndCallName,
e2etests.TestBitcoinStdMemoDepositAndCallRevertName,
e2etests.TestBitcoinStdMemoDepositAndCallRevertOtherAddressName,
e2etests.TestBitcoinStdMemoInscribedDepositAndCallName,
e2etests.TestCrosschainSwapName,
}
bitcoinDepositTestsAdvanced := []string{
e2etests.TestBitcoinDepositAndCallRevertWithDustName,
e2etests.TestBitcoinStdMemoDepositAndCallRevertOtherAddressName,
}
bitcoinWithdrawTests := []string{
e2etests.TestBitcoinWithdrawSegWitName,
Expand Down
5 changes: 2 additions & 3 deletions e2e/e2etests/test_bitcoin_deposit_and_call_revert.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package e2etests

import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/zeta-chain/node/e2e/runner"
Expand Down Expand Up @@ -40,8 +39,8 @@ func TestBitcoinDepositAndCallRevert(r *runner.E2ERunner, args []string) {

// Check revert tx receiver address and amount
receiver, value := r.QueryOutboundReceiverAndAmount(cctx.OutboundParams[1].Hash)
assert.Equal(r, r.BTCDeployerAddress.EncodeAddress(), receiver)
assert.Positive(r, value)
require.Equal(r, r.BTCDeployerAddress.EncodeAddress(), receiver)
require.True(r, value > 0)

r.Logger.Info("Sent %f BTC to TSS with invalid memo, got refund of %d satoshis", amount, value)
}
5 changes: 2 additions & 3 deletions e2e/e2etests/test_bitcoin_std_deposit_and_call_revert.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package e2etests

import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/zeta-chain/node/e2e/runner"
Expand Down Expand Up @@ -42,8 +41,8 @@ func TestBitcoinStdMemoDepositAndCallRevert(r *runner.E2ERunner, args []string)

// Check revert tx receiver address and amount
receiver, value := r.QueryOutboundReceiverAndAmount(cctx.OutboundParams[1].Hash)
assert.Equal(r, r.BTCDeployerAddress.EncodeAddress(), receiver)
assert.Positive(r, value)
require.Equal(r, r.BTCDeployerAddress.EncodeAddress(), receiver)
require.True(r, value > 0)
ws4charlie marked this conversation as resolved.
Show resolved Hide resolved

r.Logger.Info("Sent %f BTC to TSS to call non-existing contract, got refund of %d satoshis", amount, value)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package e2etests

import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/zeta-chain/node/e2e/runner"
Expand Down Expand Up @@ -46,13 +45,13 @@ func TestBitcoinStdMemoDepositAndCallRevertOtherAddress(r *runner.E2ERunner, arg
cctx := utils.WaitCctxRevertedByInboundHash(r.Ctx, r, txHash.String(), r.CctxClient)

// Make sure inbound sender and revert address are correct
assert.Equal(r, cctx.InboundParams.Sender, r.BTCDeployerAddress.EncodeAddress())
assert.Equal(r, cctx.GetCurrentOutboundParam().Receiver, revertAddress)
require.Equal(r, cctx.InboundParams.Sender, r.BTCDeployerAddress.EncodeAddress())
require.Equal(r, cctx.GetCurrentOutboundParam().Receiver, revertAddress)

// Check revert tx receiver address and amount
receiver, value := r.QueryOutboundReceiverAndAmount(cctx.OutboundParams[1].Hash)
assert.Equal(r, revertAddress, receiver)
assert.Positive(r, value)
require.Equal(r, revertAddress, receiver)
require.True(r, value > 0)

r.Logger.Info(
"Sent %f BTC to TSS to call non-existing contract, got refund of %d satoshis to other address",
Expand Down
Loading