Skip to content

Commit f2c2e98

Browse files
committed
chore: run goimports
1 parent 301f87a commit f2c2e98

File tree

3 files changed

+88
-73
lines changed

3 files changed

+88
-73
lines changed

pkg/activator/handler/handler_test.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -500,31 +500,31 @@ func (rr *responseRecorder) WriteHeader(code int) {
500500

501501
func TestWrapActivatorHandlerWithFullDuplex(t *testing.T) {
502502
logger := ktesting.TestLogger(t)
503-
503+
504504
tests := []struct {
505-
name string
506-
annotation string
507-
expectFullDuplex bool
505+
name string
506+
annotation string
507+
expectFullDuplex bool
508508
}{
509509
{
510-
name: "full duplex enabled",
511-
annotation: "Enabled",
512-
expectFullDuplex: true,
510+
name: "full duplex enabled",
511+
annotation: "Enabled",
512+
expectFullDuplex: true,
513513
},
514514
{
515-
name: "full duplex disabled",
516-
annotation: "Disabled",
517-
expectFullDuplex: false,
515+
name: "full duplex disabled",
516+
annotation: "Disabled",
517+
expectFullDuplex: false,
518518
},
519519
{
520-
name: "full duplex missing annotation",
521-
annotation: "",
522-
expectFullDuplex: false,
520+
name: "full duplex missing annotation",
521+
annotation: "",
522+
expectFullDuplex: false,
523523
},
524524
{
525-
name: "full duplex case insensitive",
526-
annotation: "enabled",
527-
expectFullDuplex: true,
525+
name: "full duplex case insensitive",
526+
annotation: "enabled",
527+
expectFullDuplex: true,
528528
},
529529
}
530530

@@ -535,13 +535,13 @@ func TestWrapActivatorHandlerWithFullDuplex(t *testing.T) {
535535
// Just respond with OK
536536
w.WriteHeader(http.StatusOK)
537537
})
538-
538+
539539
// Wrap with full duplex handler
540540
wrapped := WrapActivatorHandlerWithFullDuplex(testHandler, logger)
541-
541+
542542
// Create request with context
543543
req := httptest.NewRequest(http.MethodGet, "/", nil)
544-
544+
545545
// Set up revision context with annotation
546546
rev := &v1.Revision{
547547
ObjectMeta: metav1.ObjectMeta{
@@ -551,14 +551,14 @@ func TestWrapActivatorHandlerWithFullDuplex(t *testing.T) {
551551
if tt.annotation != "" {
552552
rev.Annotations[apiconfig.AllowHTTPFullDuplexFeatureKey] = tt.annotation
553553
}
554-
554+
555555
ctx := WithRevisionAndID(context.Background(), rev, types.NamespacedName{})
556556
req = req.WithContext(ctx)
557-
557+
558558
// Execute request
559559
resp := httptest.NewRecorder()
560560
wrapped.ServeHTTP(resp, req)
561-
561+
562562
// Verify response code
563563
if resp.Code != http.StatusOK {
564564
t.Errorf("Expected status %d, got %d", http.StatusOK, resp.Code)

0 commit comments

Comments
 (0)