Skip to content

Commit

Permalink
debug flag for CL client
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Aug 14, 2023
1 parent 51632e3 commit 54f9788
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integration-tests/client/chainlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/go-resty/resty/v2"
"github.com/rs/zerolog/log"
"golang.org/x/sync/errgroup"
"os"
)

const (
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions integration-tests/client/chainlink_k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions integration-tests/smoke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ Here is an example for 3 nodes cluster
}
]
}
```

### Debugging CL client API calls
```
export CL_CLIENT_DEBUG=true
```

0 comments on commit 54f9788

Please sign in to comment.