@@ -92,7 +92,7 @@ func TestReconcile(t *testing.T) {
9292 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
9393 Object : Revision ("foo" , "first-reconcile" ,
9494 // The first reconciliation Populates the following status properties.
95- WithLogURL , withRevisionConditionsGivenPADefault , MarkDeploying ("Deploying" ),
95+ WithLogURL , allUnknownConditions , MarkDeploying ("Deploying" ),
9696 withDefaultContainerStatuses (), WithRevisionObservedGeneration (1 )),
9797 }},
9898 Key : "foo/first-reconcile" ,
@@ -256,7 +256,7 @@ func TestReconcile(t *testing.T) {
256256 Name : "pa is ready" ,
257257 Objects : []runtime.Object {
258258 Revision ("foo" , "pa-ready" ,
259- WithLogURL , withRevisionConditionsGivenPADefault ),
259+ WithLogURL , allUnknownConditions ),
260260 pa ("foo" , "pa-ready" , WithPASKSReady , WithTraffic ,
261261 WithScaleTargetInitialized , WithPAStatusService ("new-stuff" ), WithReachabilityUnknown ),
262262 deploy (t , "foo" , "pa-ready" ),
@@ -340,7 +340,7 @@ func TestReconcile(t *testing.T) {
340340 },
341341 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
342342 Object : Revision ("foo" , "pa-inactive" ,
343- WithLogURL , withDefaultContainerStatuses (), MarkContainerHealthyUnknown ("" ),
343+ WithLogURL , withDefaultContainerStatuses (), MarkDeploying ("" ),
344344 // When we reconcile an "all ready" revision when the PA
345345 // is inactive, we should see the following change.
346346 MarkInactive ("NoTraffic" , "This thing is inactive." ), WithRevisionObservedGeneration (1 ),
@@ -351,7 +351,7 @@ func TestReconcile(t *testing.T) {
351351 }, {
352352 Name : "pa is not ready with initial scale zero, but ServiceName still empty, so not marking resources available false" ,
353353 Objects : []runtime.Object {
354- Revision ("foo" , "pa-inactive" , withRevisionConditionsGivenPADefault ,
354+ Revision ("foo" , "pa-inactive" , allUnknownConditions ,
355355 WithLogURL ,
356356 MarkDeploying (v1 .ReasonDeploying ),
357357 WithRevisionObservedGeneration (1 )),
@@ -363,7 +363,7 @@ func TestReconcile(t *testing.T) {
363363 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
364364 // We should not mark resources unavailable if ServiceName is empty
365365 Object : Revision ("foo" , "pa-inactive" ,
366- WithLogURL , withDefaultContainerStatuses (), withRevisionConditionsGivenPADefault ,
366+ WithLogURL , withDefaultContainerStatuses (), allUnknownConditions ,
367367 MarkInactive ("NoTraffic" , "This thing is inactive." ),
368368 MarkDeploying (v1 .ReasonDeploying ),
369369 WithRevisionObservedGeneration (1 )),
@@ -403,7 +403,7 @@ func TestReconcile(t *testing.T) {
403403 // Protocol type is the only thing that can be changed on PA
404404 Objects : []runtime.Object {
405405 Revision ("foo" , "fix-mutated-pa" ,
406- withRevisionConditionsGivenPADefault ,
406+ allUnknownConditions ,
407407 WithLogURL , MarkRevisionReady ,
408408 WithRoutingState (v1 .RoutingStateActive , fc )),
409409 pa ("foo" , "fix-mutated-pa" , WithProtocolType (networking .ProtocolH2C ),
@@ -414,7 +414,7 @@ func TestReconcile(t *testing.T) {
414414 },
415415 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
416416 Object : Revision ("foo" , "fix-mutated-pa" ,
417- WithLogURL , withRevisionConditionsGivenPADefault ,
417+ WithLogURL , allUnknownConditions ,
418418 // When our reconciliation has to change the service
419419 // we should see the following mutations to status.
420420
@@ -693,7 +693,7 @@ func TestReconcile(t *testing.T) {
693693 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
694694 Object : Revision ("foo" , "image-pull-secrets" ,
695695 WithImagePullSecrets ("foo-secret" ),
696- WithLogURL , withRevisionConditionsGivenPADefault , MarkDeploying ("Deploying" ), withDefaultContainerStatuses (), WithRevisionObservedGeneration (1 )),
696+ WithLogURL , allUnknownConditions , MarkDeploying ("Deploying" ), withDefaultContainerStatuses (), WithRevisionObservedGeneration (1 )),
697697 }},
698698 Key : "foo/image-pull-secrets" ,
699699 }, {
@@ -714,7 +714,7 @@ func TestReconcile(t *testing.T) {
714714 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
715715 Object : Revision ("foo" , "first-reconcile" , WithRevisionInitContainers (),
716716 // The first reconciliation Populates the following status properties.
717- WithLogURL , withRevisionConditionsGivenPADefault , MarkDeploying ("Deploying" ),
717+ WithLogURL , allUnknownConditions , MarkDeploying ("Deploying" ),
718718 withDefaultContainerStatuses (), withInitContainerStatuses (), WithRevisionObservedGeneration (1 )),
719719 }},
720720 Key : "foo/first-reconcile" ,
@@ -736,7 +736,7 @@ func TestReconcile(t *testing.T) {
736736 WantStatusUpdates : []clientgotesting.UpdateActionImpl {{
737737 Object : Revision ("foo" , "first-reconcile" ,
738738 // The first reconciliation Populates the following status properties.
739- WithLogURL , withRevisionConditionsGivenPADefault , MarkDeploying ("Deploying" ),
739+ WithLogURL , allUnknownConditions , MarkDeploying ("Deploying" ),
740740 withDefaultContainerStatuses (), WithRevisionObservedGeneration (1 ), WithRevisionPVC ()),
741741 }},
742742 Key : "foo/first-reconcile" ,
@@ -905,15 +905,6 @@ func allUnknownConditions(r *v1.Revision) {
905905 MarkActivating ("Deploying" , "" )(r )
906906}
907907
908- // Revision Unknown conditions but with the generated default PA conditions
909- // taken into consideration
910- func withRevisionConditionsGivenPADefault (r * v1.Revision ) {
911- WithInitRevConditions (r )
912- r .Status .MarkActiveUnknown ("Pending" , "Waiting for controller" )
913- r .Status .MarkResourcesAvailableUnknown ("Pending" , "Waiting for controller" )
914- r .Status .MarkContainerHealthyUnknown ("Pending" , "Waiting for controller" )
915- }
916-
917908type configOption func (* config.Config )
918909
919910type deploymentOption func (* appsv1.Deployment )
0 commit comments