Skip to content

Commit 7b0ba54

Browse files
authored
Merge pull request #223 from fmontorsi-equinix/patch-1
Show in docs the ChartSpec.Timeout
2 parents 08a142e + bf69d23 commit 7b0ba54

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

client_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package helmclient
33
import (
44
"bytes"
55
"context"
6+
"time"
67

78
"helm.sh/helm/v3/pkg/chartutil"
89

@@ -115,6 +116,7 @@ func ExampleHelmClient_InstallOrUpgradeChart() {
115116
Namespace: "default",
116117
UpgradeCRDs: true,
117118
Wait: true,
119+
Timeout: 32 * time.Second,
118120
}
119121

120122
// Install a chart release.
@@ -132,6 +134,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useChartDirectory() {
132134
Namespace: "default",
133135
UpgradeCRDs: true,
134136
Wait: true,
137+
Timeout: 32 * time.Second,
135138
}
136139

137140
if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil {
@@ -147,6 +150,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useLocalChartArchive() {
147150
Namespace: "default",
148151
UpgradeCRDs: true,
149152
Wait: true,
153+
Timeout: 32 * time.Second,
150154
}
151155

152156
if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil {
@@ -162,6 +166,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useURL() {
162166
Namespace: "default",
163167
UpgradeCRDs: true,
164168
Wait: true,
169+
Timeout: 32 * time.Second,
165170
}
166171

167172
if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil {
@@ -177,6 +182,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useDefaultRollBackStrategy() {
177182
Namespace: "default",
178183
UpgradeCRDs: true,
179184
Wait: true,
185+
Timeout: 32 * time.Second,
180186
}
181187

182188
// Use the default rollback strategy offer by HelmClient (revert to the previous version).
@@ -213,6 +219,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useCustomRollBackStrategy() {
213219
Namespace: "default",
214220
UpgradeCRDs: true,
215221
Wait: true,
222+
Timeout: 32 * time.Second,
216223
}
217224

218225
// Use a custom rollback strategy (customRollBack needs to implement RollBack).
@@ -237,6 +244,7 @@ func ExampleHelmClient_LintChart() {
237244
Namespace: "default",
238245
UpgradeCRDs: true,
239246
Wait: true,
247+
Timeout: 32 * time.Second,
240248
ValuesYaml: `deployments:
241249
etcdOperator: true
242250
backupOperator: false`,
@@ -254,6 +262,7 @@ func ExampleHelmClient_TemplateChart() {
254262
Namespace: "default",
255263
UpgradeCRDs: true,
256264
Wait: true,
265+
Timeout: 32 * time.Second,
257266
ValuesYaml: `deployments:
258267
etcdOperator: true
259268
backupOperator: false`,
@@ -290,6 +299,7 @@ func ExampleHelmClient_UninstallRelease() {
290299
ChartName: "stable/etcd-operator",
291300
Namespace: "default",
292301
Wait: true,
302+
Timeout: 32 * time.Second,
293303
DryRun: true,
294304
KeepHistory: true,
295305
}
@@ -337,6 +347,7 @@ func ExampleHelmClient_RollbackRelease() {
337347
Namespace: "default",
338348
UpgradeCRDs: true,
339349
Wait: true,
350+
Timeout: 32 * time.Second,
340351
}
341352

342353
// Rollback to the previous version of the release.

0 commit comments

Comments
 (0)