Skip to content

Commit

Permalink
Remove accidentally reintroduced tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bznein committed Jun 21, 2024
1 parent ebac607 commit 5c4dece
Showing 1 changed file with 5 additions and 46 deletions.
51 changes: 5 additions & 46 deletions modules/apps/transfer/types/transfer_authorization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,22 +163,6 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
suite.Require().Nil(res.Updated)
},
},
{
"success: transfer memo allowed in forwarding path",
func() {
allowedList := []string{testMemo1, testMemo2}
transferAuthz.Allocations[0].AllowedPacketData = allowedList
transferAuthz.Allocations[0].AllowedForwardingHops = forwardingWithValidHop
msgTransfer.Forwarding = types.NewForwarding(testMemo1, validHop)
},
func(res authz.AcceptResponse, err error) {
suite.Require().NoError(err)

suite.Require().True(res.Accept)
suite.Require().True(res.Delete)
suite.Require().Nil(res.Updated)
},
},
{
"empty AllowedPacketData but not empty memo",
func() {
Expand All @@ -190,18 +174,6 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
suite.Require().Error(err)
},
},
{
"empty AllowedPacketData but not empty memo in forwarding path",
func() {
allowedList := []string{}
transferAuthz.Allocations[0].AllowedPacketData = allowedList
transferAuthz.Allocations[0].AllowedForwardingHops = forwardingWithValidHop
msgTransfer.Forwarding = types.NewForwarding(testMemo1, validHop)
},
func(res authz.AcceptResponse, err error) {
suite.Require().Error(err)
},
},
{
"memo not allowed",
func() {
Expand All @@ -214,19 +186,6 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
suite.Require().ErrorContains(err, fmt.Sprintf("not allowed memo: %s", testMemo2))
},
},
{
"memo not allowed in forwarding path",
func() {
allowedList := []string{testMemo1}
transferAuthz.Allocations[0].AllowedPacketData = allowedList
transferAuthz.Allocations[0].AllowedForwardingHops = forwardingWithValidHop
msgTransfer.Forwarding = types.NewForwarding(testMemo2, validHop)
},
func(res authz.AcceptResponse, err error) {
suite.Require().Error(err)
suite.Require().ErrorContains(err, fmt.Sprintf("not allowed memo: %s", testMemo2))
},
},
{
"test multiple coins does not overspend",
func() {
Expand Down Expand Up @@ -325,7 +284,7 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
{
"success: allowed forwarding hops",
func() {
msgTransfer.Forwarding = types.NewForwarding("", types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-1"}, types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-2"})
msgTransfer.Forwarding = types.NewForwarding(false, types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-1"}, types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-2"})
transferAuthz.Allocations[0].AllowedForwardingHops = []types.Hops{
{
Hops: []types.Hop{
Expand Down Expand Up @@ -434,7 +393,7 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
{
"failure: allowed forwarding hops contains more hops",
func() {
msgTransfer.Forwarding = types.NewForwarding("",
msgTransfer.Forwarding = types.NewForwarding(false,
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-1"},
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-2"},
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-3"},
Expand All @@ -456,7 +415,7 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
{
"failure: allowed forwarding hops contains one different hop",
func() {
msgTransfer.Forwarding = types.NewForwarding("",
msgTransfer.Forwarding = types.NewForwarding(false,
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-1"},
types.Hop{PortId: "3", ChannelId: "channel-3"},
)
Expand All @@ -477,7 +436,7 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
{
"failure: allowed forwarding hops is empty but hops are present",
func() {
msgTransfer.Forwarding = types.NewForwarding("",
msgTransfer.Forwarding = types.NewForwarding(false,
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-1"},
)
},
Expand All @@ -489,7 +448,7 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
{
"failure: order of hops is different",
func() {
msgTransfer.Forwarding = types.NewForwarding("",
msgTransfer.Forwarding = types.NewForwarding(false,
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-1"},
types.Hop{PortId: ibctesting.MockPort, ChannelId: "channel-2"},
)
Expand Down

0 comments on commit 5c4dece

Please sign in to comment.