A bit of cleanup based on goconst tool (#8529)

* Make 1 occurence of 'foo', 'bar' and 'fizz!'

* Make 1 occurence of 'merkleizing list that is too large, over limit' string

* Limit password occurrences

* Make only 1 occurence of 'strongPass'

* Limit testMnemonic occurrences

* Limit expected epoch error messages

* Rename errors and use constant

* Update bazel dependencies

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
Panagiotis Georgiadis
2021-03-02 12:39:54 +01:00
committed by GitHub
parent b3dcbfe2a4
commit 46f6bd6d08
21 changed files with 68 additions and 68 deletions

View File

@@ -20,6 +20,8 @@ import (
keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
)
const password = "secretPassw0rd$1999"
type cliConfig struct {
keystoresPath string
password string
@@ -70,7 +72,6 @@ func setupRandomDir(t testing.TB) string {
func TestDecrypt(t *testing.T) {
keystoresDir := setupRandomDir(t)
password := "secretPassw0rd$1999"
keystore, privKey := createRandomKeystore(t, password)
// We write a random keystore to a keystores directory.
encodedKeystore, err := json.MarshalIndent(keystore, "", "\t")
@@ -109,7 +110,6 @@ func TestDecrypt(t *testing.T) {
func TestEncrypt(t *testing.T) {
keystoresDir := setupRandomDir(t)
password := "secretPassw0rd$1999"
keystoreFilePath := filepath.Join(keystoresDir, "keystore.json")
privKey, err := bls.RandKey()
require.NoError(t, err)