Skip to content

Commit 3272225

Browse files
authored
fix: fix cluster's Scheme() method in test setups (#89)
1 parent 6732b73 commit 3272225

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/clusters/cluster.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,12 @@ func (c *Cluster) Cluster() cluster.Cluster {
224224
// Scheme returns the cluster's scheme.
225225
// Returns nil if the client has not been initialized.
226226
func (c *Cluster) Scheme() *runtime.Scheme {
227-
if c.cluster == nil {
228-
return nil
227+
if c.cluster != nil {
228+
return c.cluster.GetScheme()
229+
} else if c.client != nil {
230+
return c.client.Scheme()
229231
}
230-
return c.cluster.GetScheme()
232+
return nil
231233
}
232234

233235
// APIServerEndpoint returns the cluster's API server endpoint.

0 commit comments

Comments
 (0)