Skip to content

Commit

Permalink
test(e2e): fix helm upgrade test (backport #6422) (#6427)
Browse files Browse the repository at this point in the history
test(e2e): fix helm upgrade test (#6422)

Signed-off-by: Jakub Dyszkiewicz <[email protected]>
(cherry picked from commit 7c834a9)

Co-authored-by: Jakub Dyszkiewicz <[email protected]>
  • Loading branch information
mergify[bot] and jakubdyszkiewicz authored Mar 31, 2023
1 parent 6c6dc94 commit 28e6de3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/e2e/helm/kuma_helm_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ func UpgradingWithHelmChart() {
WithHelmReleaseName(releaseName),
WithHelmChartVersion(given.initialChartVersion),
WithoutHelmOpt("global.image.tag"),
WithHelmOpt("global.image.registry", Config.KumaImageRegistry),
)).
Setup(cluster)
Expect(err).ToNot(HaveOccurred())

k8sCluster := cluster.(*K8sCluster)

err = k8sCluster.UpgradeKuma(core.Standalone, WithHelmReleaseName(releaseName), WithHelmChartPath(Config.HelmChartPath))
err = k8sCluster.UpgradeKuma(core.Standalone,
WithHelmReleaseName(releaseName),
WithHelmChartPath(Config.HelmChartPath),
ClearNoHelmOpts(),
)
Expect(err).ToNot(HaveOccurred())

// when
Expand Down
6 changes: 6 additions & 0 deletions test/framework/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ func WithoutHelmOpt(name string) KumaDeploymentOption {
})
}

func ClearNoHelmOpts() KumaDeploymentOption {
return KumaOptionFunc(func(o *kumaDeploymentOptions) {
o.noHelmOpts = nil
})
}

func WithEnv(name, value string) KumaDeploymentOption {
return KumaOptionFunc(func(o *kumaDeploymentOptions) {
o.env[name] = value
Expand Down

0 comments on commit 28e6de3

Please sign in to comment.