Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions acceptance/framework/consul/helm_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,16 @@ func (h *HelmCluster) Create(t *testing.T) {
// Fail if there are any existing installations of the Helm chart.
helpers.CheckForPriorInstallations(t, h.kubernetesClient, h.helmOptions, "consul-helm", "chart=consul-helm")

chartName := "hashicorp/consul"
if h.helmOptions.Version == config.HelmChartPath {
chartName = config.HelmChartPath
chartName := config.HelmChartPath
if h.helmOptions.Version != config.HelmChartPath {
chartName = "hashicorp/consul"
helm.AddRepo(t, h.helmOptions, "hashicorp", "https://helm.releases.hashicorp.com")
// Ignoring the error from `helm repo update` as it could fail due to stale cache or unreachable servers and we're
// asserting a chart version on Install which would fail in an obvious way should this not succeed.
_, err := helm.RunHelmCommandAndGetOutputE(t, &helm.Options{}, "repo", "update")
if err != nil {
logger.Logf(t, "Unable to update helm repository, proceeding anyway: %s.", err)
}
}
helm.Install(t, h.helmOptions, chartName, h.releaseName)

Expand Down