Skip to content

Commit

Permalink
update(comdex): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTFM committed Dec 25, 2023
1 parent cda4682 commit eee21f7
Showing 1 changed file with 41 additions and 19 deletions.
60 changes: 41 additions & 19 deletions pkg/cosmos_sdk/block/parsing/msg_parsing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ func TestParseIDsFromResults(t *testing.T) {
{
"single_result_id",
args{
&types6.ResponseDeliverTx{Events: []types6.Event{{
connectiontypes.EventTypeConnectionOpenInit,
[]types6.EventAttribute{{[]byte(connectiontypes.AttributeKeyConnectionID), []byte("myConnectionID"), true}},
}}},
&types6.ResponseDeliverTx{
Events: []types6.Event{{
Type: connectiontypes.EventTypeConnectionOpenInit,
Attributes: []types6.EventAttribute{{
Key: connectiontypes.AttributeKeyConnectionID,
Value: "myConnectionID",
Index: true,
}},
}},
},
[]string{connectiontypes.EventTypeConnectionOpenInit},
[]string{connectiontypes.AttributeKeyConnectionID},
},
Expand All @@ -53,24 +59,40 @@ func TestParseIDsFromResults(t *testing.T) {
{
"multiple_result_id",
args{
&types6.ResponseDeliverTx{Events: []types6.Event{
{
connectiontypes.EventTypeConnectionOpenInit,
[]types6.EventAttribute{
{[]byte(connectiontypes.AttributeKeyConnectionID), []byte("myConnectionID"), true},
{[]byte(connectiontypes.AttributeKeyClientID), []byte("myClientID"), true},
&types6.ResponseDeliverTx{
Events: []types6.Event{
{
Type: connectiontypes.EventTypeConnectionOpenInit,
Attributes: []types6.EventAttribute{
{
Key: connectiontypes.AttributeKeyConnectionID,
Value: "myConnectionID",
Index: true,
},
{
Key: connectiontypes.AttributeKeyClientID,
Value: "myClientID",
Index: true,
},
},
},
},
{
connectiontypes.EventTypeConnectionOpenTry,
[]types6.EventAttribute{
{[]byte(connectiontypes.AttributeKeyCounterpartyClientID), []byte("myCounterpartyClientID"), true},
{[]byte(connectiontypes.AttributeKeyCounterpartyConnectionID), []byte("myCounterpartyConnectionID"), true},
{
Type: connectiontypes.EventTypeConnectionOpenTry,
Attributes: []types6.EventAttribute{
{
Key: connectiontypes.AttributeKeyCounterpartyClientID,
Value: "myCounterpartyClientID",
Index: true,
},
{
Key: connectiontypes.AttributeKeyCounterpartyConnectionID,
Value: "myCounterpartyConnectionID",
Index: true,
},
},
},
},
}},
[]string{connectiontypes.EventTypeConnectionOpenInit, connectiontypes.EventTypeConnectionOpenTry},
[]string{connectiontypes.AttributeKeyConnectionID, connectiontypes.AttributeKeyCounterpartyConnectionID},
}, []string{connectiontypes.EventTypeConnectionOpenInit, connectiontypes.EventTypeConnectionOpenTry}, []string{connectiontypes.AttributeKeyConnectionID, connectiontypes.AttributeKeyCounterpartyConnectionID},
},
[]string{"myConnectionID", "myCounterpartyConnectionID"},
},
Expand Down

0 comments on commit eee21f7

Please sign in to comment.