Skip to content

Commit 392cbd7

Browse files
Copilotjaviercn
andcommitted
Fix test assertions to expect Accept-Encoding instead of Content-Encoding for Vary header
Co-authored-by: javiercn <[email protected]>
1 parent ffd6d64 commit 392cbd7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

test/Microsoft.NET.Sdk.StaticWebAssets.Tests/StaticWebAssets/ApplyCompressionNegotiationTest.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void AppliesContentNegotiationRules_ForExistingAssets()
8383
new () { Name = "Content-Encoding", Value = "gzip" },
8484
new () { Name = "Content-Length", Value = "9" },
8585
new () { Name = "Content-Type", Value = "text/javascript" },
86-
new () { Name = "Vary", Value = "Content-Encoding" }
86+
new () { Name = "Vary", Value = "Accept-Encoding" }
8787
],
8888
EndpointProperties = [],
8989
Selectors = [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -109,7 +109,7 @@ public void AppliesContentNegotiationRules_ForExistingAssets()
109109
new () { Name = "Content-Encoding", Value = "gzip" },
110110
new () { Name = "Content-Length", Value = "9" },
111111
new () { Name = "Content-Type", Value = "text/javascript" },
112-
new () { Name = "Vary", Value = "Content-Encoding" }
112+
new () { Name = "Vary", Value = "Accept-Encoding" }
113113
],
114114
EndpointProperties = [],
115115
Selectors = []
@@ -815,7 +815,7 @@ public void AppliesContentNegotiationRules_ToAllRelatedAssetEndpoints()
815815
[
816816
new () { Name = "Content-Encoding", Value = "gzip" },
817817
new () { Name = "Content-Type", Value = "text/javascript" },
818-
new () { Name = "Vary", Value = "Content-Encoding" }
818+
new () { Name = "Vary", Value = "Accept-Encoding" }
819819
],
820820
EndpointProperties = [],
821821
Selectors = [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -839,7 +839,7 @@ public void AppliesContentNegotiationRules_ToAllRelatedAssetEndpoints()
839839
[
840840
new () { Name = "Content-Encoding", Value = "gzip" },
841841
new () { Name = "Content-Type", Value = "text/javascript" },
842-
new () { Name = "Vary", Value = "Content-Encoding" }
842+
new () { Name = "Vary", Value = "Accept-Encoding" }
843843
],
844844
EndpointProperties = [],
845845
Selectors = [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -863,7 +863,7 @@ public void AppliesContentNegotiationRules_ToAllRelatedAssetEndpoints()
863863
[
864864
new () { Name = "Content-Encoding", Value = "gzip" },
865865
new () { Name = "Content-Type", Value = "text/javascript" },
866-
new () { Name = "Vary", Value = "Content-Encoding" }
866+
new () { Name = "Vary", Value = "Accept-Encoding" }
867867
],
868868
EndpointProperties = [],
869869
Selectors = []
@@ -918,7 +918,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
918918
[
919919
new () { Name = "Content-Encoding", Value = "gzip" },
920920
new (){ Name = "Content-Type", Value = "text/javascript" },
921-
new (){ Name = "Vary", Value = "Content-Encoding" }
921+
new (){ Name = "Vary", Value = "Accept-Encoding" }
922922
],
923923
EndpointProperties = [],
924924
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -942,7 +942,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
942942
[
943943
new (){ Name = "Content-Encoding", Value = "gzip" },
944944
new (){ Name = "Content-Type", Value = "text/javascript" },
945-
new (){ Name = "Vary", Value = "Content-Encoding" }
945+
new (){ Name = "Vary", Value = "Accept-Encoding" }
946946
],
947947
EndpointProperties = [],
948948
Selectors = [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -966,7 +966,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
966966
[
967967
new () { Name = "Content-Encoding", Value = "gzip" },
968968
new () { Name = "Content-Type", Value = "text/javascript" },
969-
new () { Name = "Vary", Value = "Content-Encoding" }
969+
new () { Name = "Vary", Value = "Accept-Encoding" }
970970
],
971971
EndpointProperties = [],
972972
Selectors = []
@@ -989,7 +989,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
989989
[
990990
new () { Name = "Content-Encoding", Value = "gzip" },
991991
new () { Name = "Content-Type", Value = "text/javascript" },
992-
new () { Name = "Vary", Value = "Content-Encoding" }
992+
new () { Name = "Vary", Value = "Accept-Encoding" }
993993
],
994994
EndpointProperties = [],
995995
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -1013,7 +1013,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
10131013
[
10141014
new () { Name = "Content-Encoding", Value = "gzip" },
10151015
new () { Name = "Content-Type", Value = "text/javascript" },
1016-
new () { Name = "Vary", Value = "Content-Encoding" }
1016+
new () { Name = "Vary", Value = "Accept-Encoding" }
10171017
],
10181018
EndpointProperties = [],
10191019
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -1037,7 +1037,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
10371037
[
10381038
new () { Name = "Content-Encoding", Value = "gzip" },
10391039
new () { Name = "Content-Type", Value = "text/javascript" },
1040-
new () { Name = "Vary", Value = "Content-Encoding" }
1040+
new () { Name = "Vary", Value = "Accept-Encoding" }
10411041
],
10421042
EndpointProperties = [],
10431043
Selectors = []
@@ -1108,7 +1108,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
11081108
[
11091109
new () { Name = "Content-Encoding", Value = "gzip" },
11101110
new (){ Name = "Content-Type", Value = "text/javascript" },
1111-
new (){ Name = "Vary", Value = "Content-Encoding" }
1111+
new (){ Name = "Vary", Value = "Accept-Encoding" }
11121112
],
11131113
EndpointProperties = [],
11141114
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -1132,7 +1132,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
11321132
[
11331133
new (){ Name = "Content-Encoding", Value = "gzip" },
11341134
new (){ Name = "Content-Type", Value = "text/javascript" },
1135-
new (){ Name = "Vary", Value = "Content-Encoding" }
1135+
new (){ Name = "Vary", Value = "Accept-Encoding" }
11361136
],
11371137
EndpointProperties = [],
11381138
Selectors = [ new () { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -1156,7 +1156,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
11561156
[
11571157
new () { Name = "Content-Encoding", Value = "gzip" },
11581158
new () { Name = "Content-Type", Value = "text/javascript" },
1159-
new () { Name = "Vary", Value = "Content-Encoding" }
1159+
new () { Name = "Vary", Value = "Accept-Encoding" }
11601160
],
11611161
EndpointProperties = [],
11621162
Selectors = []
@@ -1190,7 +1190,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
11901190
[
11911191
new () { Name = "Content-Encoding", Value = "gzip" },
11921192
new () { Name = "Content-Type", Value = "text/javascript" },
1193-
new () { Name = "Vary", Value = "Content-Encoding" }
1193+
new () { Name = "Vary", Value = "Accept-Encoding" }
11941194
],
11951195
EndpointProperties = [],
11961196
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -1203,7 +1203,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
12031203
[
12041204
new () { Name = "Content-Encoding", Value = "br" },
12051205
new () { Name = "Content-Type", Value = "text/javascript" },
1206-
new () { Name = "Vary", Value = "Content-Encoding" }
1206+
new () { Name = "Vary", Value = "Accept-Encoding" }
12071207
],
12081208
EndpointProperties = [],
12091209
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "br", Quality = "0.100000000000" } ],
@@ -1227,7 +1227,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
12271227
[
12281228
new () { Name = "Content-Encoding", Value = "gzip" },
12291229
new () { Name = "Content-Type", Value = "text/javascript" },
1230-
new () { Name = "Vary", Value = "Content-Encoding" }
1230+
new () { Name = "Vary", Value = "Accept-Encoding" }
12311231
],
12321232
EndpointProperties = [],
12331233
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "gzip", Quality = "0.100000000000" } ],
@@ -1240,7 +1240,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
12401240
[
12411241
new () { Name = "Content-Encoding", Value = "br" },
12421242
new () { Name = "Content-Type", Value = "text/javascript" },
1243-
new () { Name = "Vary", Value = "Content-Encoding" }
1243+
new () { Name = "Vary", Value = "Accept-Encoding" }
12441244
],
12451245
EndpointProperties = [],
12461246
Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding", Value = "br", Quality = "0.100000000000" } ],
@@ -1264,7 +1264,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
12641264
[
12651265
new () { Name = "Content-Encoding", Value = "gzip" },
12661266
new () { Name = "Content-Type", Value = "text/javascript" },
1267-
new () { Name = "Vary", Value = "Content-Encoding" }
1267+
new () { Name = "Vary", Value = "Accept-Encoding" }
12681268
],
12691269
EndpointProperties = [],
12701270
Selectors = []
@@ -1277,7 +1277,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
12771277
[
12781278
new () { Name = "Content-Encoding", Value = "br" },
12791279
new () { Name = "Content-Type", Value = "text/javascript" },
1280-
new () { Name = "Vary", Value = "Content-Encoding" }
1280+
new () { Name = "Vary", Value = "Accept-Encoding" }
12811281
],
12821282
EndpointProperties = [],
12831283
Selectors = []

0 commit comments

Comments
 (0)