func newDeploymentStatus(replicas, updatedReplicas, availableReplicas int32) apps.DeploymentStatus { … } // assumes the retuned deployment is always observed - not needed to be tested here. func currentDeployment(pds *int32, replicas, statusReplicas, updatedReplicas, availableReplicas int32, conditions []apps.DeploymentCondition) *apps.Deployment { … } // helper to create RS with given availableReplicas func newRSWithAvailable(name string, specReplicas, statusReplicas, availableReplicas int32) *apps.ReplicaSet { … } func TestRequeueStuckDeployment(t *testing.T) { … } func TestSyncRolloutStatus(t *testing.T) { … }