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: remove refs to AllowUpdateToExpired/Frozen client booleans #1768

Merged
merged 10 commits into from
Jul 28, 2022
Prev Previous commit
Next Next commit
rm deprecated tests
  • Loading branch information
charleenfei committed Jul 22, 2022
commit c4829cd8b1ff300286385716b976b29f569d5780
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,21 @@ func (suite *TendermintTestSuite) TestCheckSubstituteUpdateStateBasic() {
}
}

// to expire clients, time needs to be fast forwarded on both chainA and chainB.
// this is to prevent headers from failing when attempting to update later.
func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() {
testCases := []struct {
name string
expPass bool
}{
{
name: "PASS: update checks are deprecated, client is frozen and expired",
name: "PASS: update checks are deprecated",
expPass: true,
},
}

for _, tc := range testCases {
tc := tc

// for each test case a header used for unexpiring clients and unfreezing
// a client are each tested to ensure that unexpiry headers cannot update
// a client when a unfreezing header is required.
suite.Run(tc.name, func() {
// start by testing unexpiring the client
suite.SetupTest() // reset

// construct subject using test case parameters
Expand All @@ -95,10 +89,6 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() {
subjectClientState := suite.chainA.GetClientState(subjectPath.EndpointA.ClientID).(*types.ClientState)

// construct the substitute to match the subject client
// NOTE: the substitute is explicitly created after the freezing or expiry occurs,
// primarily to prevent the substitute from becoming frozen. It also should be
// the natural flow of events in practice. The subject will become frozen/expired
// and a substitute will be created along with a governance proposal as a response

substitutePath := ibctesting.NewPath(suite.chainA, suite.chainB)
suite.coordinator.SetupClients(substitutePath)
Expand Down