-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(e2e): move addresses and private keys to config (#2308)
* refactor(e2e): move all addresses and private keys to config * localnet config and inject into orchestrator * zetacored from config * generate keys in init * fmt * docs * more lint fixes * s/deployer/default_account/ * trim prefix
- Loading branch information
Showing
58 changed files
with
631 additions
and
408 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 |
---|---|---|
|
@@ -28,7 +28,7 @@ RUN go install cosmossdk.io/tools/cosmovisor/cmd/[email protected] | |
FROM golang:1.20.14-bookworm AS base-runtime | ||
|
||
RUN apt update && \ | ||
apt install -yq jq curl tmux python3 openssh-server iputils-ping iproute2 && \ | ||
apt install -yq jq yq curl tmux python3 openssh-server iputils-ping iproute2 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ssh-keygen -A && \ | ||
|
@@ -46,6 +46,7 @@ ENV PATH /root/.zetacored/cosmovisor/current/bin/:/root/.zetaclientd/upgrades/cu | |
COPY contrib/localnet/scripts /root | ||
COPY contrib/localnet/ssh_config /etc/ssh/ssh_config.d/localnet.conf | ||
COPY contrib/localnet/zetacored /root/zetacored | ||
COPY cmd/zetae2e/config/localnet.yml /root/config.yml | ||
|
||
RUN chmod 755 /root/*.sh && \ | ||
chmod 644 /etc/ssh/ssh_config.d/localnet.conf | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package config | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/zeta-chain/zetacore/e2e/config" | ||
) | ||
|
||
func TestReadConfig(t *testing.T) { | ||
tests := []struct { | ||
name string | ||
filePath string | ||
expectNoError bool | ||
expectNotEmpty bool | ||
}{ | ||
{ | ||
name: "ReadLocalnetConfig", | ||
filePath: "localnet.yml", | ||
expectNoError: true, | ||
expectNotEmpty: true, | ||
}, | ||
{ | ||
name: "ReadLocalConfig", | ||
filePath: "local.yml", | ||
expectNoError: true, | ||
expectNotEmpty: true, | ||
}, | ||
} | ||
|
||
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
conf, err := config.ReadConfig(tt.filePath) | ||
require.NoError(t, err) | ||
require.NotEmpty(t, conf.DefaultAccount.RawEVMAddress) | ||
require.NotEmpty(t, conf.DefaultAccount.RawPrivateKey) | ||
}) | ||
} | ||
} |
Oops, something went wrong.