-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2e): add e2e tests for the vesting module (#1738)
* e2e vesting account tests * rollback the `executeDelegate` changes * fix the vesting accounts addresses * add tests for Delayed Vesting Account * fix test values * fix flag from for periodic account create * add periodic vesting account tests * fix vesting account test assertions * improve code quality * fix periodic vesting balance * transfer coins to pay the delegation fee for the permanent locked account * fix create permanent locked account issue with a workaround * avoid permanent locked and period tests run at the same time in parallel * fix tx send logs and add more logs for debug * fix wait time for vesting account * debug log before unmarshall * remove parallelism * improve the code quality * revert executeGaiaTxCommand changes * revert e2e_util_test changes * add logs for CI debug * fix vesting test accounts for create vesting account command * remove unused hdpath for create genesis account * pass the docker user to the exec command * fix config dir docker permission * fix config folder permission from `777` to `755` * parse chmod stderr * avoid parse exec error * remove chmod for the config dir * debug chmod for keystore * create wallets before init the chain * add comment to `HDPath` method * use the same binary name const Co-authored-by: billy rennekamp <[email protected]>
- Loading branch information
Showing
7 changed files
with
745 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package e2e | ||
|
||
import ( | ||
"fmt" | ||
"math/rand" | ||
"strconv" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/tendermint/tendermint/crypto" | ||
"github.com/tendermint/tendermint/crypto/ed25519" | ||
) | ||
|
||
// HDPath generates an HD path based on the wallet index | ||
func HDPath(index int) string { | ||
return fmt.Sprintf("m/44'/118'/0'/0/%d", index) | ||
} | ||
|
||
// PubKey returns a sample account PubKey | ||
func PubKey() crypto.PubKey { | ||
seed := []byte(strconv.Itoa(rand.Int())) | ||
return ed25519.GenPrivKeyFromSecret(seed).PubKey() | ||
} | ||
|
||
// AccAddress returns a sample account address | ||
func AccAddress() sdk.AccAddress { | ||
addr := PubKey().Address() | ||
return sdk.AccAddress(addr) | ||
} | ||
|
||
// Address returns a sample string account address | ||
func Address() string { | ||
return AccAddress().String() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.