forked from cerc-io/laconicd-deprecated
feat: attribute typing (#40)
* marshal and unmarshal * attributes proto * fix * process attributes and create secondary mappings * get records from attributes * fix * fix lint errors * fix gosec * lower case * go mod tidy * Fix tests * "add search test" * req attributes * grpc tests * fix tests * register interface * fix tests * Remove git diff from test workflows * fix workflow file * fix simulations * fix names and add checks for attributes in tests * Add comment for attribute prefix
This commit is contained in:
@@ -162,7 +162,7 @@ func (s *IntegrationTestSuite) TestGRPCGetBondByID() {
|
||||
|
||||
// extract bond id from bonds list
|
||||
bond := queryResponse.GetBonds()[0]
|
||||
return bond.GetID()
|
||||
return bond.GetId()
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -181,11 +181,11 @@ func (s *IntegrationTestSuite) TestGRPCGetBondByID() {
|
||||
err = val.ClientCtx.Codec.UnmarshalJSON(resp, &bonds)
|
||||
|
||||
if tc.expErr {
|
||||
sr.Empty(bonds.GetBond().GetID())
|
||||
sr.Empty(bonds.GetBond().GetId())
|
||||
} else {
|
||||
sr.NoError(err)
|
||||
sr.NotZero(bonds.GetBond().GetID())
|
||||
sr.Equal(bonds.GetBond().GetID(), bondID)
|
||||
sr.NotZero(bonds.GetBond().GetId())
|
||||
sr.Equal(bonds.GetBond().GetId(), bondID)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ func (s *IntegrationTestSuite) TestGetQueryBondByID() {
|
||||
|
||||
// extract bond id from bonds list
|
||||
bond := queryResponse.GetBonds()[0]
|
||||
return bond.GetID()
|
||||
return bond.GetId()
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -225,9 +225,9 @@ func (s *IntegrationTestSuite) TestGetQueryBondByID() {
|
||||
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
|
||||
sr.NoError(err)
|
||||
if tc.err {
|
||||
sr.Zero(len(queryResponse.GetBond().GetID()))
|
||||
sr.Zero(len(queryResponse.GetBond().GetId()))
|
||||
} else {
|
||||
sr.NotZero(len(queryResponse.GetBond().GetID()))
|
||||
sr.NotZero(len(queryResponse.GetBond().GetId()))
|
||||
sr.Equal(s.accountAddress, queryResponse.GetBond().GetOwner())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -118,7 +118,7 @@ func (s *IntegrationTestSuite) TestTxRefillBond() {
|
||||
|
||||
// extract bond id from bonds list
|
||||
bond := queryResponse.GetBonds()[0]
|
||||
tc.args = append([]string{bond.GetID()}, tc.args...)
|
||||
tc.args = append([]string{bond.GetId()}, tc.args...)
|
||||
}
|
||||
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
|
||||
if tc.err {
|
||||
@@ -204,7 +204,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawAmountFromBond() {
|
||||
|
||||
// extract bond id from bonds list
|
||||
bond := queryResponse.GetBonds()[0]
|
||||
tc.args = append([]string{bond.GetID()}, tc.args...)
|
||||
tc.args = append([]string{bond.GetId()}, tc.args...)
|
||||
}
|
||||
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
|
||||
if tc.err {
|
||||
@@ -288,7 +288,7 @@ func (s *IntegrationTestSuite) TestTxCancelBond() {
|
||||
|
||||
// extract bond id from bonds list
|
||||
bond := queryResponse.GetBonds()[0]
|
||||
tc.args = append([]string{bond.GetID()}, tc.args...)
|
||||
tc.args = append([]string{bond.GetId()}, tc.args...)
|
||||
}
|
||||
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
|
||||
if tc.err {
|
||||
@@ -312,7 +312,7 @@ func (s *IntegrationTestSuite) TestTxCancelBond() {
|
||||
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
|
||||
sr.NoError(err)
|
||||
|
||||
sr.Zero(queryResponse.GetBond().GetID())
|
||||
sr.Zero(queryResponse.GetBond().GetId())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user