From 806a2dd14a6c3076c36c13c5f22bd1058bb01e91 Mon Sep 17 00:00:00 2001 From: ishaansehgal99 Date: Tue, 27 Feb 2024 22:12:14 -0800 Subject: [PATCH] nit: remove print statement --- pkg/controllers/workspace_controller.go | 2 +- pkg/controllers/workspace_controller_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controllers/workspace_controller.go b/pkg/controllers/workspace_controller.go index 893f2b975..1be44f4e5 100644 --- a/pkg/controllers/workspace_controller.go +++ b/pkg/controllers/workspace_controller.go @@ -270,7 +270,7 @@ func (c *WorkspaceReconciler) getAllQualifiedNodes(ctx context.Context, wObj *ka if err != nil { return nil, err } - fmt.Println(nodeList.Items) + if len(nodeList.Items) == 0 { klog.InfoS("no current nodes match the workspace resource spec", "workspace", klog.KObj(wObj)) return nil, nil diff --git a/pkg/controllers/workspace_controller_test.go b/pkg/controllers/workspace_controller_test.go index 17d5b94c3..cf7856ac6 100644 --- a/pkg/controllers/workspace_controller_test.go +++ b/pkg/controllers/workspace_controller_test.go @@ -499,7 +499,7 @@ func TestGetAllQualifiedNodes(t *testing.T) { Labels: map[string]string{ corev1.LabelInstanceTypeStable: "Standard_NC12s_v3", }, - DeletionTimestamp: &v1.Time{Time: time.Now()}, // This sets the current time as the deletion timestamp + DeletionTimestamp: &v1.Time{Time: time.Now()}, }, } nodeList.Items = append(nodeList.Items, deletedNode)