Skip to content

Commit d776221

Browse files
authored
Merge pull request #494 from darkowlzz/helmchart-e2e-test-val-merge
2 parents d5e0598 + 144766d commit d776221

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

controllers/helmchart_controller_test.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,17 @@ var _ = Describe("HelmChartReconciler", func() {
828828
got := &sourcev1.HelmChart{}
829829
Eventually(func() bool {
830830
_ = k8sClient.Get(context.Background(), key, got)
831-
return got.Status.Artifact.Checksum != updated.Status.Artifact.Checksum &&
832-
storage.ArtifactExist(*got.Status.Artifact)
831+
// Since a lot of chart updates took place above, checking
832+
// artifact checksum isn't the most reliable way to find out
833+
// if the artifact was changed due to the current update.
834+
// Use status condition to be sure.
835+
for _, condn := range got.Status.Conditions {
836+
if strings.Contains(condn.Message, "with merged values files [./testdata/charts/helmchart/override.yaml]") &&
837+
storage.ArtifactExist(*got.Status.Artifact) {
838+
return true
839+
}
840+
}
841+
return false
833842
}, timeout, interval).Should(BeTrue())
834843
f, err := os.Stat(storage.LocalPath(*got.Status.Artifact))
835844
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)