Skip to content

Commit

Permalink
uncomment still existing test (#1956)
Browse files Browse the repository at this point in the history
* uncomment still existing test

* forgot to include this file

* pause

* remove again

* add back rest of tests
  • Loading branch information
okwme authored Dec 13, 2022
1 parent 7308d50 commit 74f6deb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 69 deletions.
11 changes: 0 additions & 11 deletions tests/e2e/e2e_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 1 addition & 6 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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.
}
52 changes: 0 additions & 52 deletions tests/e2e/e2e_vesting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 74f6deb

Please sign in to comment.