From 94ca92df911159b16f9e8d3c1336660cc7fa47d9 Mon Sep 17 00:00:00 2001 From: LightCreator1007 Date: Mon, 11 May 2026 01:39:43 +0530 Subject: [PATCH] refactor(readiness-condition-reporter): swap context.TODO() for context.Background() in tests --- cmd/readiness-condition-reporter/main_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/readiness-condition-reporter/main_test.go b/cmd/readiness-condition-reporter/main_test.go index 51e42e9..8706e86 100644 --- a/cmd/readiness-condition-reporter/main_test.go +++ b/cmd/readiness-condition-reporter/main_test.go @@ -66,7 +66,7 @@ func TestCheckHealth(t *testing.T) { } httpClient := &http.Client{Timeout: 1 * time.Second} - health, err := checkHealth(context.TODO(), httpClient, endpoint) + health, err := checkHealth(context.Background(), httpClient, endpoint) if err != nil { if !tt.expectError { t.Errorf("checkHealth() error = %v", err) @@ -162,7 +162,7 @@ func TestUpdateNodeCondition(t *testing.T) { t.Errorf("updateNodeCondition() error = %v", err) } - updatedNode, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) + updatedNode, err := client.CoreV1().Nodes().Get(context.Background(), nodeName, metav1.GetOptions{}) if err != nil { t.Fatalf("Failed to get node: %v", err) }