Skip to content

Commit f63a8da

Browse files
committed
fix integration test
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
1 parent f06f3ef commit f63a8da

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

approval.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"status": {
2+
"conditions": [
3+
{
4+
"lastTransitionTime": "2025-12-17T23:10:38Z",
5+
"message": "lgtm",
6+
"observedGeneration": 1,
7+
"reason": "lgtm",
8+
"status": "True",
9+
"type": "Approved"
10+
}
11+
]
12+
}

pkg/controllers/updaterun/validation_integration_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,12 @@ var _ = Describe("UpdateRun validation tests", func() {
178178
})
179179

180180
It("Should fail to validate if CRP does not have external rollout strategy type", func() {
181-
By("Updating CRP's rollout strategy type")
181+
// Re-create the CRP with different strategy type as we cannot update the strategy type directly from `External` to others.
182+
By("Re-creating the CRP with rolling update rollout strategy type")
183+
Expect(k8sClient.Delete(ctx, crp)).To(Succeed())
184+
crp = generateTestClusterResourcePlacement()
182185
crp.Spec.Strategy.Type = placementv1beta1.RollingUpdateRolloutStrategyType
183-
Expect(k8sClient.Update(ctx, crp)).To(Succeed())
186+
Expect(k8sClient.Create(ctx, crp)).To(Succeed())
184187

185188
By("Validating the validation failed")
186189
wantStatus = generateFailedValidationStatus(updateRun, wantStatus)

0 commit comments

Comments
 (0)