diff --git a/client_test.go b/client_test.go index 4c7fde7..c03219d 100644 --- a/client_test.go +++ b/client_test.go @@ -3,6 +3,7 @@ package helmclient import ( "bytes" "context" + "time" "helm.sh/helm/v3/pkg/chartutil" @@ -115,6 +116,7 @@ func ExampleHelmClient_InstallOrUpgradeChart() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Install a chart release. @@ -132,6 +134,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useChartDirectory() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil { @@ -147,6 +150,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useLocalChartArchive() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil { @@ -162,6 +166,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useURL() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil { @@ -177,6 +182,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useDefaultRollBackStrategy() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Use the default rollback strategy offer by HelmClient (revert to the previous version). @@ -213,6 +219,7 @@ func ExampleHelmClient_InstallOrUpgradeChart_useCustomRollBackStrategy() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Use a custom rollback strategy (customRollBack needs to implement RollBack). @@ -237,6 +244,7 @@ func ExampleHelmClient_LintChart() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, ValuesYaml: `deployments: etcdOperator: true backupOperator: false`, @@ -254,6 +262,7 @@ func ExampleHelmClient_TemplateChart() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, ValuesYaml: `deployments: etcdOperator: true backupOperator: false`, @@ -290,6 +299,7 @@ func ExampleHelmClient_UninstallRelease() { ChartName: "stable/etcd-operator", Namespace: "default", Wait: true, + Timeout: 32 * time.Second, DryRun: true, KeepHistory: true, } @@ -337,6 +347,7 @@ func ExampleHelmClient_RollbackRelease() { Namespace: "default", UpgradeCRDs: true, Wait: true, + Timeout: 32 * time.Second, } // Rollback to the previous version of the release.