From 7b911594ac8dd4e39d061745f74112aeeb589fa1 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sat, 2 Mar 2024 03:32:14 +1100 Subject: [PATCH] Use existing trusted info for drand client test (#11666) Ref: https://github.com/drand/drand/pull/1317 --- chain/beacon/drand/drand_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chain/beacon/drand/drand_test.go b/chain/beacon/drand/drand_test.go index 7434241a5..355d6937f 100644 --- a/chain/beacon/drand/drand_test.go +++ b/chain/beacon/drand/drand_test.go @@ -3,6 +3,7 @@ package drand import ( + "bytes" "context" "os" "testing" @@ -18,7 +19,12 @@ import ( func TestPrintGroupInfo(t *testing.T) { server := build.DrandConfigs[build.DrandTestnet].Servers[0] - c, err := hclient.New(server, nil, nil) + chainInfo := build.DrandConfigs[build.DrandTestnet].ChainInfoJSON + + drandChain, err := dchain.InfoFromJSON(bytes.NewReader([]byte(chainInfo))) + assert.NoError(t, err) + c, err := hclient.NewWithInfo(server, drandChain, nil) + assert.NoError(t, err) cg := c.(interface { FetchChainInfo(ctx context.Context, groupHash []byte) (*dchain.Info, error)