@@ -580,13 +580,17 @@ public async Task StartupIsSuspendedWhenEventIsUsed()
580
580
[ RequiresNewHandler ]
581
581
[ InlineData ( "ASPNETCORE_ENVIRONMENT" , "Development" ) ]
582
582
[ InlineData ( "DOTNET_ENVIRONMENT" , "deVelopment" ) ]
583
- [ InlineData ( "ASPNETCORE_DETAILED_ERRORS " , "1" ) ]
584
- [ InlineData ( "ASPNETCORE_DETAILED_ERRORS " , "TRUE" ) ]
583
+ [ InlineData ( "ASPNETCORE_DETAILEDERRORS " , "1" ) ]
584
+ [ InlineData ( "ASPNETCORE_DETAILEDERRORS " , "TRUE" ) ]
585
585
public async Task ExceptionIsLoggedToEventLogAndPutInResponseWhenDeveloperExceptionPageIsEnabled ( string environmentVariable , string value )
586
586
{
587
587
var deploymentParameters = Fixture . GetBaseDeploymentParameters ( ) ;
588
588
deploymentParameters . TransformArguments ( ( a , _ ) => $ "{ a } Throw") ;
589
+
590
+ // Deployment parameters by default set ASPNETCORE_DETAILEDERRORS to true
591
+ deploymentParameters . EnvironmentVariables [ "ASPNETCORE_DETAILEDERRORS" ] = "" ;
589
592
deploymentParameters . EnvironmentVariables [ environmentVariable ] = value ;
593
+
590
594
var deploymentResult = await DeployAsync ( deploymentParameters ) ;
591
595
var result = await deploymentResult . HttpClient . GetAsync ( "/" ) ;
592
596
Assert . False ( result . IsSuccessStatusCode ) ;
@@ -607,6 +611,7 @@ public async Task ExceptionIsNotLoggedToResponseWhenStartupHookIsDisabled()
607
611
{
608
612
var deploymentParameters = Fixture . GetBaseDeploymentParameters ( ) ;
609
613
deploymentParameters . TransformArguments ( ( a , _ ) => $ "{ a } Throw") ;
614
+ deploymentParameters . EnvironmentVariables [ "ASPNETCORE_DETAILEDERRORS" ] = "" ;
610
615
deploymentParameters . EnvironmentVariables [ "ASPNETCORE_ENVIRONMENT" ] = "Development" ;
611
616
deploymentParameters . HandlerSettings [ "callStartupHook" ] = "false" ;
612
617
@@ -629,6 +634,9 @@ public async Task ExceptionIsLoggedToEventLogDoesNotWriteToResponse()
629
634
var deploymentParameters = Fixture . GetBaseDeploymentParameters ( ) ;
630
635
deploymentParameters . TransformArguments ( ( a , _ ) => $ "{ a } Throw") ;
631
636
637
+ // Deployment parameters by default set ASPNETCORE_DETAILEDERRORS to true
638
+ deploymentParameters . EnvironmentVariables [ "ASPNETCORE_DETAILEDERRORS" ] = "" ;
639
+
632
640
var deploymentResult = await DeployAsync ( deploymentParameters ) ;
633
641
var result = await deploymentResult . HttpClient . GetAsync ( "/" ) ;
634
642
Assert . False ( result . IsSuccessStatusCode ) ;
0 commit comments