File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
tests/Aspire.Dashboard.Tests/Integration Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -436,6 +436,22 @@ public async Task EndPointAccessors_AppStarted_BrowserGet_Success()
436436 Assert . NotEmpty ( response . Headers . GetValues ( HeaderNames . ContentSecurityPolicy ) . Single ( ) ) ;
437437 }
438438
439+ [ Fact ]
440+ public async Task Configuration_CorsNoOtlpHttpEndpoint_Error ( )
441+ {
442+ // Arrange & Act
443+ await using var app = IntegrationTestHelpers . CreateDashboardWebApplication ( testOutputHelper ,
444+ additionalConfiguration : data =>
445+ {
446+ data . Remove ( DashboardConfigNames . DashboardOtlpHttpUrlName . ConfigKey ) ;
447+ data [ $ "{ DashboardConfigNames . DashboardOtlpCorsAllowedOriginsKeyName . ConfigKey } :0"] = "https://localhost:666" ;
448+ } ) ;
449+
450+ // Assert
451+ Assert . Collection ( app . ValidationFailures ,
452+ s => Assert . Contains ( DashboardConfigNames . DashboardOtlpHttpUrlName . ConfigKey , s ) ) ;
453+ }
454+
439455 private static void AssertDynamicIPEndpoint ( Func < EndpointInfo > endPointAccessor )
440456 {
441457 // Check that the specified dynamic port of 0 is overridden with the actual port number.
You can’t perform that action at this time.
0 commit comments