Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: port ConsumerRemovalProposal handler to main #429

Merged
merged 10 commits into from
Nov 4, 2022
6 changes: 2 additions & 4 deletions tests/integration/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,8 @@ func (tr TestRun) getParam(chain chainID, param Param) string {
return value.String()
}

// queryConsumerChainRemoved checks if provided consumerChain
// was removed from the list of consumer chains on the provider.
// If a chain was not removed a panic will be raised.
// getConsumerChains returns a list of consumer chains that're being secured by the provider chain,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

// determined by querying the provider chain.
func (tr TestRun) getConsumerChains(chain chainID) map[chainID]bool {
//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
cmd := exec.Command("docker", "exec", tr.containerConfig.instanceName, tr.chainConfigs[chain].binaryName,
Expand All @@ -485,7 +484,6 @@ func (tr TestRun) getConsumerChains(chain chainID) map[chainID]bool {
`-o`, `json`,
)

// {"chains":[{"chain_id":"consu","client_id":"07-tendermint-0"}]}
bz, err := cmd.CombinedOutput()
if err != nil {
log.Fatal(err, "\n", string(bz))
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/steps_stop_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func stepsStopChain(consumerName string) []Step {
Status: "PROPOSAL_STATUS_VOTING_PERIOD",
},
},
ConsumerChains: &map[chainID]bool{"consu": true},
ConsumerChains: &map[chainID]bool{"consu": true}, // consumer chain not yet removed
},
},
},
Expand All @@ -48,7 +48,7 @@ func stepsStopChain(consumerName string) []Step {
ValBalances: &map[validatorID]uint{
validatorID("bob"): 9500000002,
},
ConsumerChains: &map[chainID]bool{},
ConsumerChains: &map[chainID]bool{}, // Consumer chain is now removed
},
},
},
Expand Down