@@ -351,7 +351,7 @@ func TestReconciler(t *testing.T) {
351351 MockGet : legacyManagedMockGetFn (nil , 42 ),
352352 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
353353 want := newLegacyManaged (42 )
354- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
354+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . ObserveMatch (). WithObservedGeneration ( 42 ) )
355355
356356 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
357357 reason := "A successful no-op reconcile should be reported as a conditioned status."
@@ -1088,7 +1088,7 @@ func TestReconciler(t *testing.T) {
10881088 MockGet : legacyManagedMockGetFn (nil , 42 ),
10891089 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
10901090 want := newLegacyManaged (42 )
1091- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
1091+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . ObserveMatch (). WithObservedGeneration ( 42 ) )
10921092
10931093 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
10941094 reason := "A successful no-op reconcile should be reported as a conditioned status."
@@ -1253,7 +1253,7 @@ func TestReconciler(t *testing.T) {
12531253 MockGet : legacyManagedMockGetFn (nil , 42 ),
12541254 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
12551255 want := newLegacyManaged (42 )
1256- want .SetConditions (xpv1 .ReconcileError (errors .Wrap (errBoom , errReconcileUpdate )).WithObservedGeneration (42 ))
1256+ want .SetConditions (xpv1 .ReconcileError (errors .Wrap (errBoom , errReconcileUpdate )).WithObservedGeneration (42 ), xpv1 . UpdateFailed (). WithObservedGeneration ( 42 ) )
12571257
12581258 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
12591259 reason := "Errors while updating an external resource should be reported as a conditioned status."
@@ -1354,7 +1354,7 @@ func TestReconciler(t *testing.T) {
13541354 MockGet : legacyManagedMockGetFn (nil , 42 ),
13551355 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
13561356 want := newLegacyManaged (42 )
1357- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
1357+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . UpdateRequested (). WithObservedGeneration ( 42 ) )
13581358
13591359 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
13601360 reason := "A successful managed resource update should be reported as a conditioned status."
@@ -1398,7 +1398,7 @@ func TestReconciler(t *testing.T) {
13981398 MockGet : legacyManagedMockGetFn (nil , 42 ),
13991399 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
14001400 want := newLegacyManaged (42 )
1401- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
1401+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . UpdateRequested (). WithObservedGeneration ( 42 ) )
14021402
14031403 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
14041404 reason := "A successful managed resource update should be reported as a conditioned status."
@@ -1450,7 +1450,7 @@ func TestReconciler(t *testing.T) {
14501450 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
14511451 want := newLegacyManaged (42 )
14521452 want .SetAnnotations (map [string ]string {meta .AnnotationKeyReconciliationPaused : "true" })
1453- want .SetConditions (xpv1 .ReconcilePaused ().WithObservedGeneration (42 ))
1453+ want .SetConditions (xpv1 .ReconcilePaused ().WithObservedGeneration (42 ), xpv1 . PausedUnknown (). WithObservedGeneration ( 42 ) )
14541454
14551455 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
14561456 reason := `If managed resource has the pause annotation with value "true", it should acquire "Synced" status condition with the status "False" and the reason "ReconcilePaused".`
@@ -1480,7 +1480,7 @@ func TestReconciler(t *testing.T) {
14801480 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
14811481 want := newLegacyManaged (42 )
14821482 want .SetManagementPolicies (xpv1.ManagementPolicies {})
1483- want .SetConditions (xpv1 .ReconcilePaused ().WithObservedGeneration (42 ))
1483+ want .SetConditions (xpv1 .ReconcilePaused ().WithObservedGeneration (42 ), xpv1 . PausedUnknown (). WithObservedGeneration ( 42 ) )
14841484
14851485 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
14861486 reason := `If managed resource has the pause annotation with value "true", it should acquire "Synced" status condition with the status "False" and the reason "ReconcilePaused".`
@@ -1516,7 +1516,7 @@ func TestReconciler(t *testing.T) {
15161516 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
15171517 want := newLegacyManaged (42 )
15181518 want .SetAnnotations (map [string ]string {meta .AnnotationKeyReconciliationPaused : "false" })
1519- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
1519+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . ObserveMatch (). WithObservedGeneration ( 42 ) )
15201520
15211521 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
15221522 reason := `Managed resource should acquire Synced=False/ReconcileSuccess status condition after a resume.`
@@ -1778,7 +1778,7 @@ func TestReconciler(t *testing.T) {
17781778 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
17791779 want := newLegacyManaged (42 )
17801780 want .SetManagementPolicies (xpv1.ManagementPolicies {xpv1 .ManagementActionObserve })
1781- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ).WithObservedGeneration (42 ))
1781+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ).WithObservedGeneration (42 ), xpv1 . UpdateRestricted (). WithObservedGeneration ( 42 ) )
17821782
17831783 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
17841784 reason := "With ObserveOnly, a successful managed resource observation should be reported as a conditioned status."
@@ -1915,7 +1915,7 @@ func TestReconciler(t *testing.T) {
19151915 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
19161916 want := newLegacyManaged (42 )
19171917 want .SetManagementPolicies (xpv1.ManagementPolicies {xpv1 .ManagementActionObserve , xpv1 .ManagementActionLateInitialize , xpv1 .ManagementActionCreate , xpv1 .ManagementActionDelete })
1918- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
1918+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . UpdateRestricted (). WithObservedGeneration ( 42 ) )
19191919
19201920 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
19211921 reason := `Managed resource should acquire Synced=False/ReconcileSuccess status condition.`
@@ -1966,7 +1966,7 @@ func TestReconciler(t *testing.T) {
19661966 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
19671967 want := newLegacyManaged (42 )
19681968 want .SetManagementPolicies (xpv1.ManagementPolicies {xpv1 .ManagementActionAll })
1969- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ).WithObservedGeneration (42 ))
1969+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ).WithObservedGeneration (42 ), xpv1 . UpdateRequested (). WithObservedGeneration ( 42 ) )
19701970
19711971 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
19721972 reason := "A successful managed resource update should be reported as a conditioned status."
@@ -2017,7 +2017,7 @@ func TestReconciler(t *testing.T) {
20172017 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
20182018 want := newLegacyManaged (42 )
20192019 want .SetManagementPolicies (xpv1.ManagementPolicies {xpv1 .ManagementActionAll })
2020- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
2020+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . UpdateRequested (). WithObservedGeneration ( 42 ) )
20212021
20222022 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
20232023 reason := "A successful managed resource update should be reported as a conditioned status."
@@ -2069,7 +2069,7 @@ func TestReconciler(t *testing.T) {
20692069 MockStatusUpdate : test .MockSubResourceUpdateFn (func (_ context.Context , obj client.Object , _ ... client.SubResourceUpdateOption ) error {
20702070 want := newLegacyManaged (42 )
20712071 want .SetManagementPolicies (xpv1.ManagementPolicies {xpv1 .ManagementActionObserve , xpv1 .ManagementActionUpdate , xpv1 .ManagementActionCreate , xpv1 .ManagementActionDelete })
2072- want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ))
2072+ want .SetConditions (xpv1 .ReconcileSuccess ().WithObservedGeneration (42 ), xpv1 . ObserveMatch (). WithObservedGeneration ( 42 ) )
20732073
20742074 if diff := cmp .Diff (want , obj , test .EquateConditions ()); diff != "" {
20752075 reason := "Errors updating a managed resource should be reported as a conditioned status."
0 commit comments