Skip to content

Commit

Permalink
e2e: log warning in case of errors
Browse files Browse the repository at this point in the history
When creating a new test ClientSet, it's useful to
log errors to the console.

Signed-off-by: Andrea Panattoni <[email protected]>
  • Loading branch information
zeeke committed Jun 1, 2023
1 parent 03cca92 commit 33eb5aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/util/client/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func New(kubeconfig string) *ClientSet {
config, err = rest.InClusterConfig()
}
if err != nil {
glog.Warningf("Error while building client config: %v", err)
return nil
}

Expand All @@ -74,6 +75,7 @@ func New(kubeconfig string) *ClientSet {
Scheme: crScheme,
})
if err != nil {
glog.Warningf("Error while creating ClientSet: %v", err)
return nil
}
return clientSet
Expand Down

0 comments on commit 33eb5aa

Please sign in to comment.