Merge pull request #494 from darkowlzz/helmchart-e2e-test-val-merge

This commit is contained in:
Hidde Beydals 2021-11-22 11:40:07 +01:00 committed by GitHub
commit d776221681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -828,8 +828,17 @@ var _ = Describe("HelmChartReconciler", func() {
got := &sourcev1.HelmChart{} got := &sourcev1.HelmChart{}
Eventually(func() bool { Eventually(func() bool {
_ = k8sClient.Get(context.Background(), key, got) _ = k8sClient.Get(context.Background(), key, got)
return got.Status.Artifact.Checksum != updated.Status.Artifact.Checksum && // Since a lot of chart updates took place above, checking
storage.ArtifactExist(*got.Status.Artifact) // 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()) }, timeout, interval).Should(BeTrue())
f, err := os.Stat(storage.LocalPath(*got.Status.Artifact)) f, err := os.Stat(storage.LocalPath(*got.Status.Artifact))
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())