From 2c368082f8cf04aac71edb1f5af36367680196a5 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Mon, 29 Jul 2024 09:52:49 -0700 Subject: [PATCH] chore: update e2e local config --- cmd/zetae2e/config/clients.go | 12 ++++++------ cmd/zetae2e/config/local.yml | 11 ++++++----- cmd/zetae2e/local/local.go | 4 ++++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/cmd/zetae2e/config/clients.go b/cmd/zetae2e/config/clients.go index b6ee7d5fb4..6e6554877f 100644 --- a/cmd/zetae2e/config/clients.go +++ b/cmd/zetae2e/config/clients.go @@ -58,12 +58,12 @@ func getClientsFromConfig(ctx context.Context, conf config.Config, account confi E2EClients, error, ) { - if conf.RPCs.Solana == "" { - return E2EClients{}, fmt.Errorf("solana rpc is empty") - } - solanaClient := rpc.New(conf.RPCs.Solana) - if solanaClient == nil { - return E2EClients{}, fmt.Errorf("failed to get solana client") + var solanaClient *rpc.Client + if conf.RPCs.Solana != "" { + solanaClient = rpc.New(conf.RPCs.Solana) + if solanaClient == nil { + return E2EClients{}, fmt.Errorf("failed to get solana client") + } } btcRPCClient, err := getBtcClient(conf.RPCs.Bitcoin) if err != nil { diff --git a/cmd/zetae2e/config/local.yml b/cmd/zetae2e/config/local.yml index f4aa45599c..54534124bd 100644 --- a/cmd/zetae2e/config/local.yml +++ b/cmd/zetae2e/config/local.yml @@ -4,17 +4,18 @@ default_account: evm_address: "0xE5C5367B8224807Ac2207d350E60e1b6F27a7ecC" private_key: "d87baf7bf6dc560a252596678c12e41f7d1682837f05b29d411bc3f78ae2c263" rpcs: - zevm: "http://0.0.0.0:9545" - evm: "http://0.0.0.0:8545" + zevm: "http://localhost:9545" + evm: "http://localhost:8545" bitcoin: - host: "0.0.0.0:18443" + host: "localhost:18443" user: "smoketest" pass: "123" http_post_mode: true disable_tls: true params: regnet - zetacore_grpc: "0.0.0.0:9090" - zetacore_rpc: "http://0.0.0.0:26657" + zetacore_grpc: "localhost:9090" + zetacore_rpc: "http://localhost:26657" + solana: "http://solana:8899" contracts: zevm: system_contract: "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921" diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index c83abf3e8a..72d01e4584 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -317,6 +317,10 @@ func localE2ETest(cmd *cobra.Command, _ []string) { eg.Go(miscTestRoutine(conf, deployerRunner, verbose, e2etests.TestMyTestName)) } if testSolana { + if deployerRunner.SolanaClient == nil { + logger.Print("❌ solana client is nil, maybe solana rpc is not set") + os.Exit(1) + } eg.Go(solanaTestRoutine(conf, deployerRunner, verbose, e2etests.TestSolanaDepositName)) }