Skip to content

Commit a2a4a70

Browse files
committed
fix UT
Signed-off-by: Britania Rodriguez Reyes <britaniar@microsoft.com>
1 parent 1b86e43 commit a2a4a70

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

pkg/controllers/updaterun/initialization.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,6 @@ func (r *Reconciler) recordOverrideSnapshots(ctx context.Context, placementKey t
484484
// only master has this annotation.
485485
if len(resourceSnapshot.GetAnnotations()[placementv1beta1.ResourceGroupHashAnnotation]) != 0 {
486486
masterResourceSnapshot = resourceSnapshot
487-
488487
break
489488
}
490489
}

pkg/controllers/updaterun/initialization_integration_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -774,18 +774,18 @@ var _ = Describe("Updaterun initialization tests", func() {
774774
validateUpdateRunMetricsEmitted(generateInitializationFailedMetric(updateRun))
775775
})
776776

777-
It("Should fail to initialize if the specified resource snapshot is not found - no resourceSnapshots at all", func() {
777+
FIt("Should fail to initialize if the specified resource snapshot is not found - no resourceSnapshots at all", func() {
778778
By("Creating a new clusterStagedUpdateRun")
779779
Expect(k8sClient.Create(ctx, updateRun)).To(Succeed())
780780

781781
By("Validating the initialization failed")
782-
validateFailedInitCondition(ctx, updateRun, "no resourceSnapshots found for placement")
782+
validateFailedInitCondition(ctx, updateRun, "no resourceSnapshots with index `0` found")
783783

784784
By("Checking update run status metrics are emitted")
785785
validateUpdateRunMetricsEmitted(generateInitializationFailedMetric(updateRun))
786786
})
787787

788-
It("Should fail to initialize if the specified resource snapshot is not found - no CRP label found", func() {
788+
FIt("Should fail to initialize if the specified resource snapshot is not found - no CRP label found", func() {
789789
By("Creating a new resource snapshot associated with another CRP")
790790
resourceSnapshot.Labels[placementv1beta1.PlacementTrackingLabel] = "not-exist-crp"
791791
Expect(k8sClient.Create(ctx, resourceSnapshot)).To(Succeed())
@@ -794,13 +794,13 @@ var _ = Describe("Updaterun initialization tests", func() {
794794
Expect(k8sClient.Create(ctx, updateRun)).To(Succeed())
795795

796796
By("Validating the initialization failed")
797-
validateFailedInitCondition(ctx, updateRun, "no resourceSnapshots found for placement")
797+
validateFailedInitCondition(ctx, updateRun, "no resourceSnapshots with index `0` found")
798798

799799
By("Checking update run status metrics are emitted")
800800
validateUpdateRunMetricsEmitted(generateInitializationFailedMetric(updateRun))
801801
})
802802

803-
It("Should fail to initialize if the specified resource snapshot is not found - no resource index label found", func() {
803+
FIt("Should fail to initialize if the specified resource snapshot is not found - no resource index label found", func() {
804804
By("Creating a new resource snapshot with a different index label")
805805
resourceSnapshot.Labels[placementv1beta1.ResourceIndexLabel] = testResourceSnapshotIndex + "1"
806806
Expect(k8sClient.Create(ctx, resourceSnapshot)).To(Succeed())
@@ -809,7 +809,7 @@ var _ = Describe("Updaterun initialization tests", func() {
809809
Expect(k8sClient.Create(ctx, updateRun)).To(Succeed())
810810

811811
By("Validating the initialization failed")
812-
validateFailedInitCondition(ctx, updateRun, "no resourceSnapshots found for placement")
812+
validateFailedInitCondition(ctx, updateRun, "no resourceSnapshots with index `0` found")
813813

814814
By("Checking update run status metrics are emitted")
815815
validateUpdateRunMetricsEmitted(generateInitializationFailedMetric(updateRun))

0 commit comments

Comments
 (0)