Skip to content

Commit 3a587df

Browse files
committed
Fixup
1 parent 73c46c3 commit 3a587df

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/Analyzers/Analyzers/test/TestFiles/StartupAnalyzerTest/UseAuthFallbackPolicy.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public void Configure(IApplicationBuilder app)
1212
// This sort of setup would be useful if the user wants to use Auth for non-endpoint content to be handled using the Fallback policy, while
1313
// using the second instance for regular endpoint routing based auth. We do not want to produce a warning in this case.
1414
app.UseAuthorization();
15+
app.UseStaticFiles();
1516

1617
app.UseRouting();
1718
app.UseAuthorization();

src/Analyzers/Analyzers/test/TestFiles/StartupAnalyzerTest/UseAuthMultipleTimes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public void Configure(IApplicationBuilder app)
1111
{
1212
app.UseRouting();
1313
app.UseAuthorization();
14+
app.UseAuthorization();
1415
app.UseEndpoints(r => { });
1516
}
1617
}

src/Http/Routing/test/FunctionalTests/EndpointRoutingIntegrationTest.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public async Task AuthorizationMiddleware_WhenNoAuthMetadataIsConfigured()
3737
app.UseRouting();
3838
app.UseAuthorization();
3939
app.UseEndpoints(b => b.Map("/", TestDelegate));
40-
4140
})
4241
.ConfigureServices(services =>
4342
{
@@ -62,7 +61,6 @@ public async Task AuthorizationMiddleware_WhenEndpointIsNotFound()
6261
app.UseRouting();
6362
app.UseAuthorization();
6463
app.UseEndpoints(b => b.Map("/", TestDelegate));
65-
6664
})
6765
.ConfigureServices(services =>
6866
{
@@ -87,7 +85,6 @@ public async Task AuthorizationMiddleware_WithAuthorizedEndpoint()
8785
app.UseRouting();
8886
app.UseAuthorization();
8987
app.UseEndpoints(b => b.Map("/", TestDelegate).RequireAuthorization());
90-
9188
})
9289
.ConfigureServices(services =>
9390
{
@@ -134,7 +131,6 @@ public async Task AuthorizationMiddleware_NotConfigured_WhenEndpointIsNotFound()
134131
{
135132
app.UseRouting();
136133
app.UseEndpoints(b => b.Map("/", TestDelegate).RequireAuthorization());
137-
138134
})
139135
.ConfigureServices(services =>
140136
{
@@ -158,7 +154,6 @@ public async Task AuthorizationMiddleware_ConfiguredBeforeRouting_Throws()
158154
app.UseAuthorization();
159155
app.UseRouting();
160156
app.UseEndpoints(b => b.Map("/", TestDelegate).RequireAuthorization());
161-
162157
})
163158
.ConfigureServices(services =>
164159
{
@@ -182,7 +177,6 @@ public async Task AuthorizationMiddleware_ConfiguredAfterRouting_Throws()
182177
app.UseRouting();
183178
app.UseEndpoints(b => b.Map("/", TestDelegate).RequireAuthorization());
184179
app.UseAuthorization();
185-
186180
})
187181
.ConfigureServices(services =>
188182
{
@@ -206,7 +200,6 @@ public async Task CorsMiddleware_WithCorsEndpoint()
206200
app.UseRouting();
207201
app.UseCors();
208202
app.UseEndpoints(b => b.Map("/", TestDelegate).RequireCors(policy => policy.AllowAnyOrigin()));
209-
210203
})
211204
.ConfigureServices(services =>
212205
{
@@ -231,7 +224,6 @@ public async Task CorsMiddleware_ConfiguredBeforeRouting_Throws()
231224
app.UseCors();
232225
app.UseRouting();
233226
app.UseEndpoints(b => b.Map("/", TestDelegate).RequireCors(policy => policy.AllowAnyOrigin()));
234-
235227
})
236228
.ConfigureServices(services =>
237229
{

0 commit comments

Comments
 (0)