Skip to content

Commit

Permalink
Add ReadBridges() to E2E tests core client (#11282)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl authored Nov 14, 2023
1 parent b7f042c commit b36d9eb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions integration-tests/client/chainlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b36d9eb

Please sign in to comment.