Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronc committed Mar 19, 2024
1 parent 0aabd0b commit 84ba6f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
8 changes: 4 additions & 4 deletions x/ecocredit/base/keeper/features/msg_bridge_receive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ Feature: Msg/BridgeReceive
Given a credit type with abbreviation "C"
And a credit class with id "C01" and issuer alice
And allowed bridge chain "polygon"
And a project with id "C01-001"
And a credit batch with denom "C01-001-20200101-20210101-001" and issuer alice
And a project with id "P001"
And a credit batch with denom "C01-P001-20200101-20210101-001" and issuer alice
And the batch contract
"""
{
Expand Down Expand Up @@ -231,8 +231,8 @@ Feature: Msg/BridgeReceive
Given a credit type with abbreviation "C"
And a credit class with id "C01" and issuer alice
And allowed bridge chain "polygon"
And a project with id "C01-001"
And a credit batch with denom "C01-001-20200101-20210101-001" and issuer alice
And a project with id "P001"
And a credit batch with denom "C01-P001-20200101-20210101-001" and issuer alice
And the batch contract
"""
{
Expand Down
15 changes: 0 additions & 15 deletions x/ecocredit/base/keeper/msg_bridge_receive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ func (s *bridgeReceiveSuite) AProjectWithId(a string) {
})
require.NoError(s.t, err)

seq := s.getProjectSequence(a)

err = s.k.stateStore.ProjectSequenceTable().Insert(s.ctx, &api.ProjectSequence{
ClassKey: s.classKey,
NextSequence: seq + 1,
})
require.NoError(s.t, err)

s.projectKey = pKey
}

Expand Down Expand Up @@ -488,13 +480,6 @@ func (s *bridgeReceiveSuite) ExpectEventWithProperties(a gocuke.DocString) {
require.NoError(s.t, err)
}

func (s *bridgeReceiveSuite) getProjectSequence(projectID string) uint64 {
str := strings.Split(projectID, "-")
seq, err := strconv.ParseUint(str[1], 10, 32)
require.NoError(s.t, err)
return seq
}

func (s *bridgeReceiveSuite) getBatchSequence(batchDenom string) uint64 {
str := strings.Split(batchDenom, "-")
seq, err := strconv.ParseUint(str[4], 10, 32)
Expand Down

0 comments on commit 84ba6f9

Please sign in to comment.