Skip to content

Commit

Permalink
Conflict resolution after cherry pick
Browse files Browse the repository at this point in the history
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
  • Loading branch information
0xavi0 committed Oct 7, 2024
1 parent 0e7c964 commit 8a96966
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions integrationtests/gitjob/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,16 +358,6 @@ var _ = Describe("GitJob controller", func() {
g.Expect(checkCondition(&gitRepo, "Ready", corev1.ConditionTrue, "")).To(BeTrue())
g.Expect(checkCondition(&gitRepo, "Accepted", corev1.ConditionTrue, "")).To(BeTrue())
}).Should(Succeed())
<<<<<<< HEAD

By("verifying that the job is deleted if Spec.Generation changed")
Expect(simulateIncreaseGitRepoGeneration(gitRepo)).ToNot(HaveOccurred())
Eventually(func() bool {
jobName = name.SafeConcatName(gitRepoName, name.Hex(repo+commit, 5))
return errors.IsNotFound(k8sClient.Get(ctx, types.NamespacedName{Name: jobName, Namespace: gitRepoNamespace}, &job))
}).Should(BeTrue())
=======
>>>>>>> 57c2f838 (Changes job handling in gitops controller (#2903))
})
})
})
Expand Down Expand Up @@ -438,7 +428,7 @@ var _ = Describe("GitJob controller", func() {
}).Should(Not(HaveOccurred()))
// wait until the job has finished
Eventually(func() bool {
jobName = names.SafeConcatName(gitRepoName, names.Hex(repo+commit, 5))
jobName = name.SafeConcatName(gitRepoName, name.Hex(repo+commit, 5))
err := k8sClient.Get(ctx, types.NamespacedName{Name: jobName, Namespace: gitRepoNamespace}, &job)
return errors.IsNotFound(err)
}).Should(BeTrue())
Expand All @@ -448,7 +438,7 @@ var _ = Describe("GitJob controller", func() {
Expect(simulateIncreaseForceSyncGeneration(gitRepo)).ToNot(HaveOccurred())
// simulate job was successful
Eventually(func() error {
jobName = names.SafeConcatName(gitRepoName, names.Hex(repo+commit, 5))
jobName = name.SafeConcatName(gitRepoName, name.Hex(repo+commit, 5))
err := k8sClient.Get(ctx, types.NamespacedName{Name: jobName, Namespace: gitRepoNamespace}, &job)
// We could be checking this when the job is still not created
Expect(client.IgnoreNotFound(err)).ToNot(HaveOccurred())
Expand All @@ -463,7 +453,7 @@ var _ = Describe("GitJob controller", func() {
}).Should(Not(HaveOccurred()))
// wait until the job has finished
Eventually(func() bool {
jobName = names.SafeConcatName(gitRepoName, names.Hex(repo+commit, 5))
jobName = name.SafeConcatName(gitRepoName, name.Hex(repo+commit, 5))
err := k8sClient.Get(ctx, types.NamespacedName{Name: jobName, Namespace: gitRepoNamespace}, &job)
return errors.IsNotFound(err)
}).Should(BeTrue())
Expand Down Expand Up @@ -553,7 +543,7 @@ var _ = Describe("GitJob controller", func() {
}).Should(Not(HaveOccurred()))
// wait until the job has finished
Eventually(func() bool {
jobName = names.SafeConcatName(gitRepoName, names.Hex(repo+commit, 5))
jobName = name.SafeConcatName(gitRepoName, name.Hex(repo+commit, 5))
err := k8sClient.Get(ctx, types.NamespacedName{Name: jobName, Namespace: gitRepoNamespace}, &job)
return errors.IsNotFound(err)
}).Should(BeTrue())
Expand Down

0 comments on commit 8a96966

Please # to comment.