Skip to content

Commit 732e032

Browse files
authored
Merge pull request #479 from liam-mackie/lm/add-kwok-wait-duration
Add `WithWaitDuration` ClusterOpts function
2 parents 6e42505 + dfdcefb commit 732e032

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

support/kwok/kwok.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import (
2323
type Cluster = tptkwok.Cluster
2424

2525
var (
26-
NewCluster = tptkwok.NewCluster
27-
NewProvider = tptkwok.NewProvider
28-
WithPath = tptkwok.WithPath
26+
NewCluster = tptkwok.NewCluster
27+
NewProvider = tptkwok.NewProvider
28+
WithPath = tptkwok.WithPath
29+
WithWaitDuration = tptkwok.WithWaitDuration
2930
)

third_party/kwok/kwok.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ func WithPath(path string) support.ClusterOpts {
6464
}
6565
}
6666

67+
func WithWaitDuration(waitDuration time.Duration) support.ClusterOpts {
68+
return func(c support.E2EClusterProvider) {
69+
k, ok := c.(*Cluster)
70+
if ok {
71+
k.waitDuration = waitDuration
72+
}
73+
}
74+
}
75+
6776
func (k *Cluster) findOrInstallKwokCtl() error {
6877
if k.version != "" {
6978
kwokVersion = k.version

0 commit comments

Comments
 (0)