131 references to WithEnvironment
Aspire.Hosting.Azure.Kubernetes.Tests (1)
AzureKubernetesFoundryReferenceTests.cs (1)
68.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url));
Aspire.Hosting.Azure.Tests (12)
AzureAppServiceTests.cs (1)
439.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url));
AzureContainerAppExpressEndpointTests.cs (4)
211.WithEnvironment("ORIGIN", api.GetEndpoint("http").Property(property)); 249web.WithEnvironment("HOST", api.GetEndpoint("http").Property(EndpointProperty.Host)); 286.WithEnvironment("API_HOST", endpoint.Property(EndpointProperty.Host)) 319.WithEnvironment("API_URL", api.GetEndpoint("http").Property(EndpointProperty.Url));
AzureContainerAppsTests.cs (1)
202.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url));
AzureDeployerTests.cs (1)
1256.WithEnvironment("DEPENDENT_VALUE", dependentParam);
AzureEnvironmentResourceTests.cs (4)
73.WithEnvironment("ORIGIN", origin) 74.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins) 109.WithEnvironment("ORIGIN", origins) 110.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins)
AzureFrontDoorPrivateLinkTests.cs (1)
149.WithEnvironment("API_HOST", api.GetEndpoint("https").Property(EndpointProperty.Host));
Aspire.Hosting.Docker.Tests (14)
DockerComposePublisherTests.cs (14)
41consumer.WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins) 47.WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 49consumer.WithEnvironment("REPEATED", web.GetEndpoint("http").BrowserOrigins) 80.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins) 81.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins) 82.WithEnvironment("REPEATED", first.GetEndpoint("c").BrowserOrigins); 110var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("endpoint").Property(property)); 132builder.AddContainer("consumer", "image").WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 153.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 154.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 185.WithEnvironment("ORIGIN", origin) 186.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins) 1502.WithEnvironment("CACHE_TLS", cache.GetEndpoint("tls").Property(EndpointProperty.TlsEnabled)) 1503.WithEnvironment("CACHE_PLAIN_TLS", cache.GetEndpoint("tcp").Property(EndpointProperty.TlsEnabled));
Aspire.Hosting.Foundry.Tests (3)
HostedAgentExtensionTests.cs (3)
682.WithEnvironment("ConnectionStrings__my-db", reference) 713.WithEnvironment(names.OriginalName, reference) 714.WithEnvironment(names.PortableName, reference);
Aspire.Hosting.Kubernetes.Tests (19)
KubernetesPublisherTests.cs (19)
37builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("endpoint").Property(property)); 63.WithEnvironment("ORIGINS", origin) 71.WithEnvironment("PORT", web.GetEndpoint("HTTP").Property(EndpointProperty.Port)); 133.WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 159var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 200.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins) 201.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins) 202.WithEnvironment("REPEATED", first.GetEndpoint("c").BrowserOrigins); 249.WithEnvironment("ORIGIN", endpoint.PrimaryBrowserOrigin) 250.WithEnvironment("ORIGINS", endpoint.BrowserOrigins); 296var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 317.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 318.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 353.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 354.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 378.WithEnvironment("ORIGIN", origin) 379.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins) 2237.WithEnvironment("CACHE_TLS", cache.GetEndpoint("tls").Property(EndpointProperty.TlsEnabled)) 2238.WithEnvironment("CACHE_PLAIN_TLS", cache.GetEndpoint("tcp").Property(EndpointProperty.TlsEnabled));
Aspire.Hosting.Radius.Tests (18)
Publishing\BackingResourceProjectionTests.cs (4)
90.WithEnvironment("CUSTOM_HOST", cache.GetEndpoint("tcp").Property(EndpointProperty.Host)) 91.WithEnvironment("CUSTOM_PORT", cache.GetEndpoint("tcp").Property(EndpointProperty.Port)) 92.WithEnvironment("CUSTOM_URL", cache.GetEndpoint("tcp").Property(EndpointProperty.Url)); 112.WithEnvironment("BACKEND_HOST", backend.GetEndpoint("http").Property(EndpointProperty.Host));
Publishing\BackingResourceValueResolutionTests.cs (8)
125.WithEnvironment("MISSING", backend.GetEndpoint("does-not-exist").Property(EndpointProperty.Host)) 126.WithEnvironment("PRESENT", backend.GetEndpoint("http").Property(EndpointProperty.Host)); 415.WithEnvironment("MGMT_URL", rabbit.GetEndpoint("management").Property(EndpointProperty.Url)); 434.WithEnvironment("AMQP_HOST", rabbit.GetEndpoint("tcp").Property(EndpointProperty.Host)); 967.WithEnvironment("CACHE_URL", cache.GetEndpoint("tcp").Property(EndpointProperty.Url)); 986.WithEnvironment("CACHE_HOST", cache.GetEndpoint("tcp").Property(EndpointProperty.Host)) 987.WithEnvironment("CACHE_PORT", cache.GetEndpoint("tcp").Property(EndpointProperty.Port)); 1476.WithEnvironment("STORE_HOST", store.GetEndpoint("tcp").Property(EndpointProperty.Host));
Publishing\RadiusDeployParametersTests.cs (6)
45.WithEnvironment("ORIGINS", producer.GetEndpoint("endpoint").Property(property)); 69.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins) 70.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins) 71.WithEnvironment("REPEATED", first.GetEndpoint("c").BrowserOrigins); 100.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 101.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins)
Aspire.Hosting.Tests (61)
Dcp\DcpExecutorTests.cs (24)
5035database.WithEnvironment("PUBLIC_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 5036database.WithEnvironment("PUBLIC_PORT_AGAIN", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 5083database.WithEnvironment("PUBLIC_HOST_AND_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.HostAndPort)); 10688.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 10689.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 10695.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 10696.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 10796.WithEnvironment("URL", new HostUrl($"https://{host}:17092/path")); 10830.WithEnvironment("URL", new HostUrl($"https://{host}:5678/path")); 11228.WithEnvironment("EXEC_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 11259.WithEnvironment("EXECUTABLE_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 11293.WithEnvironment("HOST_PORT", executable.GetEndpoint("unused").Property(EndpointProperty.Port)); 11337.WithEnvironment("TARGET_PORT", targetEndpoint.Property(EndpointProperty.Port)); 11379project.WithEnvironment( 11418.WithEnvironment( 11455executable.WithEnvironment( 11524executable.WithEnvironment( 11579.WithEnvironment( 11669executable.WithEnvironment( 11711.WithEnvironment("TARGET_PORT", containerEndpoint.Property(EndpointProperty.Port)); 11713.WithEnvironment("TARGET_PORT", target.GetEndpoint("http").Property(EndpointProperty.Port)); 11769.WithEnvironment("EXEC_A_PORT", executableA.GetEndpoint("http").Property(EndpointProperty.Port)); 11775.WithEnvironment("EXEC_B_PORT", executableB.GetEndpoint("http").Property(EndpointProperty.Port)) 11832.WithEnvironment("UPSTREAM_PORT", upstreamExecutable.GetEndpoint("http").Property(EndpointProperty.Port))
EndpointReferenceTests.cs (1)
676var backend = builder.AddContainer("backend", "image").WithEnvironment("ORIGIN", origin);
ExpressionResolverTests.cs (1)
219.WithEnvironment("envname", new HostUrl("http://localhost:18889/path"));
ManifestExpressionTests.cs (22)
41consumer.WithEnvironment("SECRET", secret); 62consumer.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins); 63consumer.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins); 67consumer.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins); 68consumer.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins); 170.WithEnvironment("TLS", tls) 194.WithEnvironment("CUSTOM", custom) 223.WithEnvironment("FIRST", first) 252builder.AddContainer("backend", "image").WithEnvironment("VALUES", wrapper); 273builder.AddContainer("backend", "image").WithEnvironment("VALUES", wrapper); 290builder.AddContainer("backend", "image").WithEnvironment("VALUES", wrapper); 306backend.WithEnvironment("TLS", backend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled)); 326builder.AddContainer("backend", "image").WithEnvironment("HOST", symbolic); 413.WithEnvironment("DIRECT", origin) 415.WithEnvironment("WRAPPED", wrapped) 419.WithEnvironment("HOST", endpoint.Property(EndpointProperty.Host)); 456.WithEnvironment("ORIGIN", frontend.GetEndpoint("http").BrowserOrigins); 633builder.AddContainer("backend", "image").WithEnvironment("REDIRECT", wrapper); 655builder.AddContainer("backend", "image").WithEnvironment("URL", wrapper); 669builder.AddContainer("backend", "image").WithEnvironment("CUSTOM", value); 683builder.AddContainer("backend", "image").WithEnvironment("CUSTOM", value); 700builder.AddContainer("backend", "image").WithEnvironment("CUSTOM", first);
Orchestrator\ApplicationOrchestratorTests.cs (1)
305.WithEnvironment("FRONTEND_ORIGIN", browserEndpoint)
ResourceDependencyTests.cs (2)
55.WithEnvironment("API_PORT", api.GetEndpoint("http").Property(EndpointProperty.Port)); 89.WithEnvironment("URL", new HostUrl($"http://{hostName}:17092/path"));
Schema\SchemaTests.cs (3)
65.WithEnvironment("URL", wrapper) 66.WithEnvironment("ORIGIN", frontend.GetEndpoint("http").PrimaryBrowserOrigin) 67.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins)
WithEnvironmentTests.cs (6)
390.WithEnvironment("TEST_VAR", testValue); 418.WithEnvironment("TEST_VAR", testValue); 444ResourceBuilderExtensions.WithEnvironment<TResource, TestValueAndManifestProvider>(null!, "TEST_VAR", testValue)); 448projectA.WithEnvironment<TResource, TestValueAndManifestProvider>(null!, testValue)); 452projectA.WithEnvironment("TEST_VAR", (TestValueAndManifestProvider)null!)); 471.WithEnvironment("ENDPOINT_PORT", portProperty);
WithReferenceTests.cs (1)
986.WithEnvironment("ConnectionStrings__my-db", new ConnectionStringReference(standalone.Resource, optional: false))
Aspire.Hosting.Yarp (1)
YarpResourceExtensions.cs (1)
72.WithEnvironment("ASPNETCORE_HTTPS_PORT", resource.GetEndpoint("https").Property(EndpointProperty.Port))
EntraId.AppHost (1)
AppHost.cs (1)
64nodeWeb.WithEnvironment("NODE_WEB_BASE_URL", nodeWeb.GetEndpoint("https").PrimaryBrowserOrigin);
ExternalServices.AppHost (1)
AppHost.cs (1)
40.WithEnvironment("FRONTEND_URL", new HostUrl("http://frontend.dev.localhost:5115"))