Skip to content

Commit d874dfb

Browse files
committed
test: always send events
1 parent ac1c86b commit d874dfb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

components/ws-manager-mk2/controllers/subscriber_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ func (r *SubscriberReconciler) Reconcile(ctx context.Context, req ctrl.Request)
6161
workspace.Status.Conditions = []metav1.Condition{}
6262
}
6363

64-
if workspace.IsConditionTrue(workspacev1.WorkspaceConditionPodRejected) {
65-
// In this situation, we are about to re-create the pod. We don't want clients to see all the "stopping, stopped, starting" chatter, so we hide it here.
66-
// TODO(gpl) Is this a sane approach?
67-
return ctrl.Result{}, nil
68-
}
64+
// if workspace.IsConditionTrue(workspacev1.WorkspaceConditionPodRejected) {
65+
// // In this situation, we are about to re-create the pod. We don't want clients to see all the "stopping, stopped, starting" chatter, so we hide it here.
66+
// // TODO(gpl) Is this a sane approach?
67+
// return ctrl.Result{}, nil
68+
// }
6969

7070
if r.OnReconcile != nil {
7171
r.OnReconcile(ctx, &workspace)

components/ws-manager-mk2/controllers/workspace_controller_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,9 @@ var _ = Describe("WorkspaceController", func() {
532532
recreations: map[int]int{1: 1},
533533
})
534534

535-
expectPhaseTransitions(su, []workspacev1.WorkspacePhase{workspacev1.WorkspacePhasePending, workspacev1.WorkspacePhaseCreating, workspacev1.WorkspacePhaseInitializing, workspacev1.WorkspacePhaseRunning})
535+
// "Pending", "Unknown", "Stopping", "Stopped", "Pending", "Creating", "Initializing", "Running"
536+
expectPhaseTransitions(su, []workspacev1.WorkspacePhase{workspacev1.WorkspacePhasePending, workspacev1.WorkspacePhaseUnknown, workspacev1.WorkspacePhaseStopping, workspacev1.WorkspacePhaseStopped, workspacev1.WorkspacePhasePending, workspacev1.WorkspacePhaseCreating, workspacev1.WorkspacePhaseInitializing, workspacev1.WorkspacePhaseRunning})
537+
//expectPhaseTransitions(su, []workspacev1.WorkspacePhase{workspacev1.WorkspacePhasePending, workspacev1.WorkspacePhaseCreating, workspacev1.WorkspacePhaseInitializing, workspacev1.WorkspacePhaseRunning})
536538
// ### validate end
537539
})
538540
})

0 commit comments

Comments
 (0)