From b36d9ebe3f2e35ccbe26f7c83774e589b369d7fc Mon Sep 17 00:00:00 2001 From: Lukasz <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:02:42 +0100 Subject: [PATCH] Add ReadBridges() to E2E tests core client (#11282) --- integration-tests/client/chainlink.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/integration-tests/client/chainlink.go b/integration-tests/client/chainlink.go index ef7bd061426..7d5825c261a 100644 --- a/integration-tests/client/chainlink.go +++ b/integration-tests/client/chainlink.go @@ -302,6 +302,19 @@ func (c *ChainlinkClient) ReadBridge(name string) (*BridgeType, *http.Response, return &bt, resp.RawResponse, err } +// ReadBridges reads bridges from the Chainlink node +func (c *ChainlinkClient) ReadBridges() (*ResponseSlice, *resty.Response, error) { + result := &ResponseSlice{} + c.l.Info().Str(NodeURL, c.Config.URL).Msg("Getting all bridges") + resp, err := c.APIClient.R(). + SetResult(&result). + Get("/v2/bridge_types") + if err != nil { + return nil, nil, err + } + return result, resp, err +} + // DeleteBridge deletes a bridge on the Chainlink node based on the provided name func (c *ChainlinkClient) DeleteBridge(name string) (*http.Response, error) { c.l.Info().Str(NodeURL, c.Config.URL).Str("Name", name).Msg("Deleting Bridge")