From ee80c6d0657fa7239a29a3fbee3d3c74631c7d4c Mon Sep 17 00:00:00 2001 From: Sergey Kudasov Date: Mon, 14 Aug 2023 22:53:32 +0300 Subject: [PATCH] debug flag for CL client (#10191) --- integration-tests/client/chainlink.go | 5 +++++ integration-tests/client/chainlink_k8s.go | 4 ++++ integration-tests/smoke/README.md | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/integration-tests/client/chainlink.go b/integration-tests/client/chainlink.go index 28c060f1ef3..7d3bd0284d0 100644 --- a/integration-tests/client/chainlink.go +++ b/integration-tests/client/chainlink.go @@ -13,6 +13,7 @@ import ( "github.com/go-resty/resty/v2" "github.com/rs/zerolog/log" "golang.org/x/sync/errgroup" + "os" ) const ( @@ -46,6 +47,10 @@ func NewChainlinkClient(c *ChainlinkConfig) (*ChainlinkClient, error) { if err != nil { return nil, err } + _, isSet := os.LookupEnv("CL_CLIENT_DEBUG") + if isSet { + rc.SetDebug(true) + } return &ChainlinkClient{ Config: c, APIClient: rc, diff --git a/integration-tests/client/chainlink_k8s.go b/integration-tests/client/chainlink_k8s.go index 5586f320f27..4aa7c6d0fec 100644 --- a/integration-tests/client/chainlink_k8s.go +++ b/integration-tests/client/chainlink_k8s.go @@ -23,6 +23,10 @@ func NewChainlinkK8sClient(c *ChainlinkConfig, podName, chartName string) (*Chai if err != nil { return nil, err } + _, isSet := os.LookupEnv("CL_CLIENT_DEBUG") + if isSet { + rc.SetDebug(true) + } return &ChainlinkK8sClient{ ChainlinkClient: &ChainlinkClient{ APIClient: rc, diff --git a/integration-tests/smoke/README.md b/integration-tests/smoke/README.md index f8a9e94211b..f76c956e4c5 100644 --- a/integration-tests/smoke/README.md +++ b/integration-tests/smoke/README.md @@ -49,4 +49,9 @@ Here is an example for 3 nodes cluster } ] } +``` + +### Debugging CL client API calls +``` +export CL_CLIENT_DEBUG=true ``` \ No newline at end of file