Skip to content

Commit af1bf73

Browse files
committed
chore: run goimports
1 parent 9d3f1cc commit af1bf73

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pkg/queue/sharedmain/handlers_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func TestMainHandlerWithPendingRequests(t *testing.T) {
127127
var wg sync.WaitGroup
128128
wg.Add(numRequests)
129129

130-
for i := 0; i < numRequests; i++ {
130+
for i := range numRequests {
131131
go func(i int) {
132132
defer wg.Done()
133133
req := httptest.NewRequest(http.MethodGet, "/test", nil)
@@ -256,4 +256,4 @@ func TestExists(t *testing.T) {
256256
t.Error("Expected false for non-existent file")
257257
}
258258
})
259-
}
259+
}

pkg/queue/sharedmain/handlers_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ func TestRequestQueueDrainHandler(t *testing.T) {
101101
if w.Code != http.StatusOK {
102102
t.Errorf("Expected status 200, got %d", w.Code)
103103
}
104-
104+
105105
// Verify the drainer is in draining state by sending a probe
106106
probeReq := httptest.NewRequest(http.MethodGet, "/", nil)
107107
probeReq.Header.Set("User-Agent", "kube-probe/1.0")
108108
probeW := httptest.NewRecorder()
109109
drainer.ServeHTTP(probeW, probeReq)
110-
110+
111111
// Should return 503 because drainer is draining
112112
if probeW.Code != http.StatusServiceUnavailable {
113113
t.Errorf("Expected probe to return 503 during drain, got %d", probeW.Code)
@@ -144,7 +144,7 @@ func TestRequestQueueDrainHandler(t *testing.T) {
144144
probeReq.Header.Set("User-Agent", "kube-probe/1.0")
145145
probeW := httptest.NewRecorder()
146146
drainer.ServeHTTP(probeW, probeReq)
147-
147+
148148
if probeW.Code != http.StatusServiceUnavailable {
149149
t.Errorf("Expected probe to return 503 during drain, got %d", probeW.Code)
150150
}
@@ -157,7 +157,7 @@ func TestRequestQueueDrainHandler(t *testing.T) {
157157
probeReq2.Header.Set("User-Agent", "kube-probe/1.0")
158158
probeW2 := httptest.NewRecorder()
159159
drainer.ServeHTTP(probeW2, probeReq2)
160-
160+
161161
// Should return 200 because drainer was reset
162162
if probeW2.Code != http.StatusOK {
163163
t.Errorf("Expected probe to return 200 after reset, got %d", probeW2.Code)
@@ -245,7 +245,7 @@ func TestWithRequestCounter(t *testing.T) {
245245
var wg sync.WaitGroup
246246
wg.Add(numRequests)
247247

248-
for i := 0; i < numRequests; i++ {
248+
for range numRequests {
249249
go func() {
250250
defer wg.Done()
251251
req := httptest.NewRequest(http.MethodGet, "/", nil)

0 commit comments

Comments
 (0)