@@ -998,15 +998,23 @@ func Test_transport_Vary_MultipleHeaders(t *testing.T) {
998998 // Request 1: MISS — first request for en-us + 2025-01-01
999999 resp := makeReq ("en-us" , "2025-01-01" )
10001000 testutil .AssertEqual (t , http .StatusOK , resp .StatusCode )
1001- testutil .AssertEqual (t , internal .CacheStatusMiss .Value , resp .Header .Get (internal .CacheStatusHeader ))
1001+ testutil .AssertEqual (
1002+ t ,
1003+ internal .CacheStatusMiss .Value ,
1004+ resp .Header .Get (internal .CacheStatusHeader ),
1005+ )
10021006 body , _ := io .ReadAll (resp .Body )
10031007 _ = resp .Body .Close ()
10041008 testutil .AssertEqual (t , "lang=en-us date=2025-01-01" , string (body ))
10051009
10061010 // Request 2: HIT — same headers
10071011 resp = makeReq ("en-us" , "2025-01-01" )
10081012 testutil .AssertEqual (t , http .StatusOK , resp .StatusCode )
1009- testutil .AssertEqual (t , internal .CacheStatusHit .Value , resp .Header .Get (internal .CacheStatusHeader ))
1013+ testutil .AssertEqual (
1014+ t ,
1015+ internal .CacheStatusHit .Value ,
1016+ resp .Header .Get (internal .CacheStatusHeader ),
1017+ )
10101018 body , _ = io .ReadAll (resp .Body )
10111019 _ = resp .Body .Close ()
10121020 testutil .AssertEqual (t , "lang=en-us date=2025-01-01" , string (body ))
@@ -1015,16 +1023,24 @@ func Test_transport_Vary_MultipleHeaders(t *testing.T) {
10151023 // This is the bug: without the fix, this incorrectly returns a HIT
10161024 resp = makeReq ("en-us" , "2026-01-01" )
10171025 testutil .AssertEqual (t , http .StatusOK , resp .StatusCode )
1018- testutil .AssertEqual (t , internal .CacheStatusMiss .Value , resp .Header .Get (internal .CacheStatusHeader ),
1019- "X-Compatibility-Date is a Vary header; different value must produce a cache MISS" )
1026+ testutil .AssertEqual (
1027+ t ,
1028+ internal .CacheStatusMiss .Value ,
1029+ resp .Header .Get (internal .CacheStatusHeader ),
1030+ "X-Compatibility-Date is a Vary header; different value must produce a cache MISS" ,
1031+ )
10201032 body , _ = io .ReadAll (resp .Body )
10211033 _ = resp .Body .Close ()
10221034 testutil .AssertEqual (t , "lang=en-us date=2026-01-01" , string (body ))
10231035
10241036 // Request 4: HIT — same as request 3
10251037 resp = makeReq ("en-us" , "2026-01-01" )
10261038 testutil .AssertEqual (t , http .StatusOK , resp .StatusCode )
1027- testutil .AssertEqual (t , internal .CacheStatusHit .Value , resp .Header .Get (internal .CacheStatusHeader ))
1039+ testutil .AssertEqual (
1040+ t ,
1041+ internal .CacheStatusHit .Value ,
1042+ resp .Header .Get (internal .CacheStatusHeader ),
1043+ )
10281044 body , _ = io .ReadAll (resp .Body )
10291045 _ = resp .Body .Close ()
10301046 testutil .AssertEqual (t , "lang=en-us date=2026-01-01" , string (body ))
0 commit comments