Skip to content

Commit

Permalink
fix tests for tracker IDs != diff approval ID
Browse files Browse the repository at this point in the history
  • Loading branch information
trevormil committed Jan 24, 2024
1 parent fb22d9f commit 6427e4e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
5 changes: 3 additions & 2 deletions x/badges/keeper/challenges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,7 @@ func (suite *TestSuite) TestMultipleApprovalCriteria() {
collectionsToCreate[0].CollectionApprovals = append(collectionsToCreate[0].CollectionApprovals, &deepCopy)

collectionsToCreate[0].CollectionApprovals[2].AmountTrackerId = "test2"
collectionsToCreate[0].CollectionApprovals[2].ChallengeTrackerId = "test2"
collectionsToCreate[0].CollectionApprovals[2].ApprovalId = "fasdfasdf"
collectionsToCreate[0].CollectionApprovals[2].ApprovalCriteria = &types.ApprovalCriteria{
MaxNumTransfers: &types.MaxNumTransfers{
Expand Down Expand Up @@ -2637,8 +2638,8 @@ func (suite *TestSuite) TestMultipleApprovalCriteria() {

OverridesFromOutgoingApprovals: true,
OverridesToIncomingApprovals: true,
}, AmountTrackerId: "testing232",
ChallengeTrackerId: "testing232",
}, AmountTrackerId: "asadsdas",
ChallengeTrackerId: "asadsdas",
ApprovalId: "asadsdas",

TransferTimes: GetFullUintRanges(),
Expand Down
38 changes: 20 additions & 18 deletions x/badges/keeper/update_checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ func (suite *TestSuite) TestCheckCollectionApprovalUpdate() {
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testdfgh",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testdfgh",
ChallengeTrackerId: "testdfgh",
ApprovalCriteria: collectionsToCreate[0].CollectionApprovals[1].ApprovalCriteria,
},
},
Expand All @@ -450,6 +450,7 @@ func (suite *TestSuite) TestCheckCollectionApprovalUpdate() {
ApprovalId: "test",
ApprovalCriteria: collectionsToCreate[0].CollectionApprovals[1].ApprovalCriteria,
ChallengeTrackerId: "something different",
AmountTrackerId: "something different",
},
{
FromListId: "!" + alice,
Expand All @@ -461,6 +462,7 @@ func (suite *TestSuite) TestCheckCollectionApprovalUpdate() {
ApprovalId: "testhdfgjhdf",
ApprovalCriteria: collectionsToCreate[0].CollectionApprovals[1].ApprovalCriteria,
ChallengeTrackerId: "test",
AmountTrackerId: "test",
},
},
})
Expand Down Expand Up @@ -606,8 +608,8 @@ func (suite *TestSuite) TestCheckCollectionApprovalUpdateAmountTrackerIds() {
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testadsfasdf",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testadsfasdf",
ChallengeTrackerId: "testadsfasdf",
ApprovalCriteria: collectionsToCreate[0].CollectionApprovals[1].ApprovalCriteria,
},
},
Expand Down Expand Up @@ -761,7 +763,7 @@ func (suite *TestSuite) TestCheckCollectionApprovalUpdateAmountTrackerIdsSpecifi
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "tesadsft",
AmountTrackerId: "asdffdafs",
ChallengeTrackerId: "test",
ChallengeTrackerId: "asdffdafs",
ApprovalCriteria: collectionsToCreate[0].CollectionApprovals[1].ApprovalCriteria,
},
{
Expand All @@ -772,8 +774,8 @@ func (suite *TestSuite) TestCheckCollectionApprovalUpdateAmountTrackerIdsSpecifi
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testasdfasd",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testasdfasd",
ChallengeTrackerId: "testasdfasd",
ApprovalCriteria: collectionsToCreate[0].CollectionApprovals[1].ApprovalCriteria,
},
},
Expand Down Expand Up @@ -1074,8 +1076,8 @@ func (suite *TestSuite) TestSplittingIntoMultipleIsEquivalent() {
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testgfag",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testgfag",
ChallengeTrackerId: "testgfag",
ApprovalCriteria: newApprovalCriteria,
},
},
Expand Down Expand Up @@ -1157,8 +1159,8 @@ func (suite *TestSuite) TestSplittingIntoMultipleIsEquivalentSeparateBalances()
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testagdf",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testagdf",
ChallengeTrackerId: "testagdf",
ApprovalCriteria: newApprovalCriteria,
},
},
Expand Down Expand Up @@ -1226,8 +1228,8 @@ func (suite *TestSuite) TestSplittingIntoMultipleIsEquivalentSeparateBalancesTwo
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testadfgsd",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testadfgsd",
ChallengeTrackerId: "testadfgsd",
ApprovalCriteria: newApprovalCriteria,
},
},
Expand Down Expand Up @@ -1325,8 +1327,8 @@ func (suite *TestSuite) TestSplittingIntoMultipleIsEquivalentSeparatePredetermin
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testsgdfs",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testsgdfs",
ChallengeTrackerId: "testsgdfs",
ApprovalCriteria: newApprovalCriteria,
},
},
Expand Down Expand Up @@ -1425,8 +1427,8 @@ func (suite *TestSuite) TestSplitPredetrminedBalancesEquivalentButNotSameTransfe
TransferTimes: GetFullUintRanges(),
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "testsdfgsdf",
AmountTrackerId: "test",
ChallengeTrackerId: "test",
AmountTrackerId: "testsdfgsdf",
ChallengeTrackerId: "testsdfgsdf",
ApprovalCriteria: newApprovalCriteria,
},
},
Expand Down Expand Up @@ -1520,7 +1522,7 @@ func (suite *TestSuite) TestGetMaxPossible() {
OwnershipTimes: GetFullUintRanges(),
ApprovalId: "tessdgfst",
AmountTrackerId: "adsfhjaladsfasdf",
ChallengeTrackerId: "test",
ChallengeTrackerId: "adsfhjaladsfasdf",
ApprovalCriteria: &types.ApprovalCriteria{

ApprovalAmounts: &types.ApprovalAmounts{
Expand Down

0 comments on commit 6427e4e

Please sign in to comment.