From 74f6debfaf1b6b0ef726561d7a6609fb64249d07 Mon Sep 17 00:00:00 2001 From: billy rennekamp Date: Tue, 13 Dec 2022 09:04:11 -0500 Subject: [PATCH] uncomment still existing test (#1956) * uncomment still existing test * forgot to include this file * pause * remove again * add back rest of tests --- tests/e2e/e2e_exec_test.go | 11 -------- tests/e2e/e2e_test.go | 7 +---- tests/e2e/e2e_vesting_test.go | 52 ----------------------------------- 3 files changed, 1 insertion(+), 69 deletions(-) diff --git a/tests/e2e/e2e_exec_test.go b/tests/e2e/e2e_exec_test.go index dbe93d0345e..fb2fd5cf473 100644 --- a/tests/e2e/e2e_exec_test.go +++ b/tests/e2e/e2e_exec_test.go @@ -155,17 +155,6 @@ func (s *IntegrationTestSuite) execVestingTx( s.T().Logf("successfully %s with %v", method, args) } -func (s *IntegrationTestSuite) execCreatePermanentLockedAccount( - c *chain, - address, - amount string, - opt ...flagOption, -) { - s.T().Logf("Executing gaiad create a permanent locked vesting account %s", c.id) - s.execVestingTx(c, "create-permanent-locked-account", []string{address, amount}, opt...) - s.T().Logf("successfully created permanent locked vesting account %s with %s", address, amount) -} - func (s *IntegrationTestSuite) execCreatePeriodicVestingAccount( c *chain, address, diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 53a901550a2..a4db17e7e7c 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -54,7 +54,6 @@ func (s *IntegrationTestSuite) TestFeeGrant() { s.testFeeGrant() } -// TODO: Add back after antehandler is fixed func (s *IntegrationTestSuite) TestGlobalFees() { if !runGlobalFeesTest { s.T().Skip() @@ -63,7 +62,6 @@ func (s *IntegrationTestSuite) TestGlobalFees() { s.testQueryGlobalFeesInGenesis() } -// TODO: Add back gov tests using the legacy gov system func (s *IntegrationTestSuite) TestGov() { if !runGovTest { s.T().Skip() @@ -106,8 +104,5 @@ func (s *IntegrationTestSuite) TestVesting() { chainAAPI := fmt.Sprintf("http://%s", s.valResources[s.chainA.id][0].GetHostPort("1317/tcp")) s.testDelayedVestingAccount(chainAAPI) s.testContinuousVestingAccount(chainAAPI) - - // TODO: Add back vesting account here - // s.testPermanentLockedAccount(chainAAPI) - // s.testPeriodicVestingAccount(chainAAPI) + // s.testPeriodicVestingAccount(chainAAPI) TODO: add back when v0.45 adds the missing CLI command. } diff --git a/tests/e2e/e2e_vesting_test.go b/tests/e2e/e2e_vesting_test.go index b53f1eaf206..e23cb4f77ac 100644 --- a/tests/e2e/e2e_vesting_test.go +++ b/tests/e2e/e2e_vesting_test.go @@ -196,58 +196,6 @@ func (s *IntegrationTestSuite) testContinuousVestingAccount(api string) { }) } -func (s *IntegrationTestSuite) testPermanentLockedAccount(api string) { - s.Run("test permanent locked vesting genesis account", func() { - var ( - valIdx = 0 - chain = s.chainA - val = chain.validators[valIdx] - permanentLockedAddr = chain.genesisVestingAccounts[lockedVestingKey].String() - ) - sender := val.keyInfo.GetAddress() - valOpAddr := sdk.ValAddress(sender).String() - - s.execCreatePermanentLockedAccount(chain, permanentLockedAddr, - vestingAmountVested.String(), withKeyValue(flagFrom, sender.String()), - ) - - _, err := queryPermanentLockedAccount(api, permanentLockedAddr) - s.Require().NoError(err) - - // Check address balance - balance, err := getSpecificBalance(api, permanentLockedAddr, uatomDenom) - s.Require().NoError(err) - s.Require().Equal(vestingAmountVested.Amount, balance.Amount) - - // Transfer coins to pay the delegation fee - s.execBankSend(chain, valIdx, sender.String(), permanentLockedAddr, - standardFees.String(), standardFees.String(), false) - - // Delegate coins should succeed - s.executeDelegate(chain, valIdx, vestingDelegationAmount.String(), valOpAddr, - permanentLockedAddr, gaiaHomePath, vestingDelegationFees.String()) - - // Validate delegation successful - s.Require().Eventually( - func() bool { - res, err := queryDelegation(api, valOpAddr, permanentLockedAddr) - amt := res.GetDelegationResponse().GetDelegation().GetShares() - s.Require().NoError(err) - - return amt.Equal(sdk.NewDecFromInt(vestingDelegationAmount.Amount)) - }, - 20*time.Second, - 5*time.Second, - ) - - // Transfer coins should fail - balance, err = getSpecificBalance(api, permanentLockedAddr, uatomDenom) - s.Require().NoError(err) - s.execBankSend(chain, valIdx, permanentLockedAddr, Address(), - balance.Sub(standardFees).String(), standardFees.String(), true) - }) -} - func (s *IntegrationTestSuite) testPeriodicVestingAccount(api string) { s.Run("test periodic vesting genesis account", func() { var (