@@ -329,37 +329,6 @@ public void ForceNonSecureReceiverOverridesHttpsEndpoints()
329
329
Assert . Equal ( "http" , httpEndpoint . UriScheme ) ;
330
330
}
331
331
332
- [ Fact ]
333
- public void DevCertificateLogicIsNotTriggeredInNonDevelopmentEnvironment ( )
334
- {
335
- var builder = DistributedApplication . CreateBuilder ( ) ;
336
- builder . Configuration [ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL" ] = "https://localhost:18889" ;
337
-
338
- builder . AddOpenTelemetryCollector ( "collector" , settings =>
339
- {
340
- settings . ForceNonSecureReceiver = false ; // Allow HTTPS
341
- } )
342
- . WithAppForwarding ( ) ;
343
-
344
- using var app = builder . Build ( ) ;
345
-
346
- var appModel = app . Services . GetRequiredService < DistributedApplicationModel > ( ) ;
347
- var collectorResource = appModel . Resources . OfType < OpenTelemetryCollectorResource > ( ) . SingleOrDefault ( ) ;
348
- Assert . NotNull ( collectorResource ) ;
349
-
350
- // In non-development environment (default test environment), dev cert args should not be added
351
- var args = collectorResource . Annotations . OfType < CommandLineArgsCallbackAnnotation > ( ) . ToList ( ) ;
352
- var context = new CommandLineArgsCallbackContext ( [ ] ) ;
353
- foreach ( var arg in args )
354
- {
355
- arg . Callback ( context ) ;
356
- }
357
-
358
- // Should not contain TLS certificate configuration args since we're not in Development environment with RunMode
359
- Assert . DoesNotContain ( context . Args . Cast < string > ( ) , a => a . Contains ( "receivers::otlp::protocols::http::tls::cert_file" ) ) ;
360
- Assert . DoesNotContain ( context . Args . Cast < string > ( ) , a => a . Contains ( "receivers::otlp::protocols::grpc::tls::cert_file" ) ) ;
361
- }
362
-
363
332
[ Fact ]
364
333
public void DevCertificateLogicIsNotTriggeredWhenForceNonSecureReceiverEnabled ( )
365
334
{
@@ -464,7 +433,7 @@ public void RunWithHttpsDevCertificateAddsContainerFilesAndWaitAnnotation()
464
433
public void RunWithHttpsDevCertificateNotTriggeredInNonRunMode ( )
465
434
{
466
435
// Use regular builder (not TestDistributedApplicationBuilder.Create) which defaults to non-Run mode
467
- var builder = DistributedApplication . CreateBuilder ( ) ;
436
+ var builder = TestDistributedApplicationBuilder . Create ( DistributedApplicationOperation . Publish ) ;
468
437
builder . Configuration [ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL" ] = "https://localhost:18889" ;
469
438
470
439
builder . AddOpenTelemetryCollector ( "collector" , settings =>
@@ -522,7 +491,7 @@ public void RunWithHttpsDevCertificateNotTriggeredWhenForceNonSecureEnabled()
522
491
}
523
492
524
493
[ Fact ]
525
- public void DevCertificateResourcesAddedWhenHttpsEnabledInDevelopment ( )
494
+ public void DevCertificateResourcesAddedWhenHttpsEnabled ( )
526
495
{
527
496
var builder = TestDistributedApplicationBuilder . Create ( DistributedApplicationOperation . Run ) ;
528
497
builder . Configuration [ "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL" ] = "https://localhost:18889" ;
0 commit comments