We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5386351 commit 67ad75fCopy full SHA for 67ad75f
pkg/clusters/cluster.go
@@ -36,6 +36,16 @@ func New(id string) *Cluster {
36
return c
37
}
38
39
+// NewTestClusterFromClient creates a Cluster from a given client.
40
+// Note that this method is meant for testing purposes only and it does not result in a fully functional Cluster.
41
+// Calling anything except Client() on the resulting Cluster is undefined and might lead to panics or unexpected behavior.
42
+func NewTestClusterFromClient(id string, cli client.Client) *Cluster {
43
+ c := &Cluster{}
44
+ c.InitializeID(id)
45
+ c.client = cli
46
+ return c
47
+}
48
+
49
// WithConfigPath sets the config path for the cluster.
50
// Returns the cluster for chaining.
51
func (c *Cluster) WithConfigPath(cfgPath string) *Cluster {
0 commit comments