Skip to content

Commit

Permalink
feat: Add lock on reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
samirtahir91 committed Mar 31, 2024
1 parent 95b13b6 commit c7a40d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/githubapp_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,14 @@ var _ = Describe("GithubApp controller", func() {
Eventually(func() bool {
// Retrieve the GitHubApp object
key := types.NamespacedName{Name: githubAppName3, Namespace: namespace3}
err := k8sClient.Get(ctx, key, githubApp)
retrievedGithubApp := &githubappv1.GithubApp{}
err := k8sClient.Get(ctx, key, retrievedGithubApp)
if err != nil {
return false // Unable to retrieve the GitHubApp
}
// Check if the status.Error field contains the expected error message
return retrievedGithubApp.Status.Error == "Secret \"gh-app-key-test\" not found"
}, "60s", "5s").Should(BeTrue(), "Failed to set status.Error field within timeout")
}, time.Minute*1).Should(BeTrue(), "Failed to set status.Error field within timeout")
})
})
})

0 comments on commit c7a40d3

Please sign in to comment.