Skip to content

Commit

Permalink
tests: update confusing e2e democracy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Mar 12, 2024
1 parent 366bbb5 commit a2de1e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 6 additions & 2 deletions tests/e2e/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,24 @@ var slashThrottleSteps = concatSteps(
stepsStopChain("consu", 2),
)

// these tests start with transfer SendEnabled set to false
// one of the steps will set SendEnabled to true
var democracyRewardsSteps = concatSteps(
// democracySteps requires a transfer channel
stepsStartChains([]string{"democ"}, true),
// delegation needs to happen so the first VSC packet can be delivered
stepsDelegate("democ"),
stepsDemocracy("democ"),
stepsRewardDenomConsumer("democ"),
)

// these tests start with transfer SendEnabled set to false
// these tests start with transfer SendEnabled set to true
var democracySteps = concatSteps(
// democracySteps requires a transfer channel
stepsStartChains([]string{"democ"}, true),
// delegation needs to happen so the first VSC packet can be delivered
stepsDelegate("democ"),
stepsRewardDenomConsumer("democ"),
stepsDemocracy("democ"),
)

var multipleConsumers = concatSteps(
Expand Down
11 changes: 6 additions & 5 deletions tests/e2e/steps_democracy.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func stepsDemocracy(consumerName string) []Step {
},
},
{
// whitelisted legacy proposal can only handle ibctransfer.SendEnabled/ReceiveEnabled
// this proposal will allow ibc transfer by setting SendEnabled to true
Action: SubmitParamChangeLegacyProposalAction{
Chain: ChainID(consumerName),
From: ValidatorID("alice"),
Expand Down Expand Up @@ -181,12 +181,13 @@ func stepsDemocracy(consumerName string) []Step {
},
State: State{
ChainID("provi"): ChainState{
// Check that tokens are minted and sent to provider chain and distributed to validators and their delegators on provider chain
// Check that ARE NOT minted and sent to provider chain and distributed to validators and their delegators on provider chain
// the tokens are not sent because the test configuration does not allow sending tokens
Rewards: &Rewards{
IsRewarded: map[ValidatorID]bool{
ValidatorID("alice"): true,
ValidatorID("bob"): true,
ValidatorID("carol"): true,
ValidatorID("alice"): false,
ValidatorID("bob"): false,
ValidatorID("carol"): false,
},
IsIncrementalReward: false,
IsNativeDenom: false,
Expand Down
9 changes: 5 additions & 4 deletions tests/e2e/steps_reward_denom.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,13 @@ func stepsRewardDenomConsumer(consumerName string) []Step {
},
State: State{
ChainID("provi"): ChainState{
// Check that tokens are not minted and sent to provider chain and distributed to validators and their delegators on provider chain
// Check that ARE minted and sent to provider chain and distributed to validators and their delegators on provider chain
// the tokens are sent because the test configuration does allows sending tokens
Rewards: &Rewards{
IsRewarded: map[ValidatorID]bool{
ValidatorID("alice"): false,
ValidatorID("bob"): false,
ValidatorID("carol"): false,
ValidatorID("alice"): true,
ValidatorID("bob"): true,
ValidatorID("carol"): true,
},
IsIncrementalReward: false,
IsNativeDenom: false,
Expand Down

0 comments on commit a2de1e5

Please sign in to comment.