Skip to content

Commit

Permalink
Merge pull request #841 from fluxcd/fix-test-flake
Browse files Browse the repository at this point in the history
controller: address test flake
  • Loading branch information
stefanprodan authored Dec 11, 2023
2 parents f3e4789 + f64246b commit 7d0aecf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions internal/controller/helmrelease_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,12 +852,14 @@ func TestHelmReleaseReconciler_reconcileDelete(t *testing.T) {
g.Expect(err).To(MatchError(helmdriver.ErrReleaseNotFound))

// Verify Helm chart has been removed.
err = testEnv.Get(context.TODO(), client.ObjectKey{
Namespace: hc.Namespace,
Name: hc.Name,
}, &sourcev1b2.HelmChart{})
g.Expect(err).To(HaveOccurred())
g.Expect(apierrors.IsNotFound(err)).To(BeTrue())
g.Eventually(func(g Gomega) {
err = testEnv.Get(context.TODO(), client.ObjectKey{
Namespace: hc.Namespace,
Name: hc.Name,
}, &sourcev1b2.HelmChart{})
g.Expect(err).To(HaveOccurred())
g.Expect(apierrors.IsNotFound(err)).To(BeTrue())
}).Should(Succeed())
})

t.Run("removes finalizer for suspended resource with DeletionTimestamp", func(t *testing.T) {
Expand Down

0 comments on commit 7d0aecf

Please sign in to comment.