Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controllers: Fix helmchart values file merge test #494

Merged
merged 1 commit into from
Nov 22, 2021
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: 11 additions & 2 deletions controllers/helmchart_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,17 @@ var _ = Describe("HelmChartReconciler", func() {
got := &sourcev1.HelmChart{}
Eventually(func() bool {
_ = k8sClient.Get(context.Background(), key, got)
return got.Status.Artifact.Checksum != updated.Status.Artifact.Checksum &&
storage.ArtifactExist(*got.Status.Artifact)
// Since a lot of chart updates took place above, checking
// artifact checksum isn't the most reliable way to find out
// if the artifact was changed due to the current update.
// Use status condition to be sure.
for _, condn := range got.Status.Conditions {
if strings.Contains(condn.Message, "with merged values files [./testdata/charts/helmchart/override.yaml]") &&
storage.ArtifactExist(*got.Status.Artifact) {
return true
}
}
return false
}, timeout, interval).Should(BeTrue())
f, err := os.Stat(storage.LocalPath(*got.Status.Artifact))
Expect(err).NotTo(HaveOccurred())
Expand Down