1574 references to Path
Aspire.Hosting.Azure.EntraId.Tests (29)
EntraIdProvisioningTests.cs (29)
453
using var first = entra.Resource.GetBicepTemplateFile(workspace.
Path
);
455
using var second = entra.Resource.GetBicepTemplateFile(workspace.
Path
);
487
var manifest = await ManifestUtils.GetManifest(entra.Resource, workspace.
Path
);
497
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
510
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
514
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
515
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
522
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
533
workspace.
Path
,
541
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
542
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
549
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
558
workspace.
Path
,
569
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep");
576
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
591
workspace.
Path
,
599
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
600
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
607
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
622
workspace.
Path
,
630
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "web", "web.bicep")), "bicep");
637
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
663
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
667
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
668
var apiBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-api", "entra-api.bicep"));
669
var webBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep"));
670
var consumerBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "consumer", "consumer.bicep"));
671
Assert.Equal(new[] { "consumer", "entra-api", "entra-web" }, Directory.GetDirectories(workspace.
Path
).Select(Path.GetFileName).Order());
1067
DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: WellKnownPipelineSteps.Deploy);
Aspire.Hosting.Azure.Kubernetes.Tests (29)
AzureKubernetesEnvironmentExtensionsTests.cs (23)
656
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
657
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
658
var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, roles.Name, $"{roles.Name}.bicep"));
659
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "registry", "registry.bicep"));
660
var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity", "aks-control-plane-identity.bicep"));
661
var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-kubelet-identity", "aks-kubelet-identity.bicep"));
662
var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity-roles-aks-kubelet-identity", "aks-control-plane-identity-roles-aks-kubelet-identity.bicep"));
836
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
837
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
838
var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, operatorRole.Name, $"{operatorRole.Name}.bicep"));
839
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-acr", "aks-acr.bicep"));
840
var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity", "aks-control-plane-identity.bicep"));
841
var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-kubelet-identity", "aks-kubelet-identity.bicep"));
842
var registryRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, registryRole.Name, $"{registryRole.Name}.bicep"));
926
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
927
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "registry", "registry.bicep"));
928
var registryRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, registryRole.Name, $"{registryRole.Name}.bicep"));
929
var networkBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "network", "network.bicep"));
930
var networkRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, networkRole.Name, $"{networkRole.Name}.bicep"));
931
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
932
var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity", "aks-control-plane-identity.bicep"));
933
var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-kubelet-identity", "aks-kubelet-identity.bicep"));
935
var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, operatorRoleName, $"{operatorRoleName}.bicep"));
AzureKubernetesFoundryReferenceTests.cs (1)
51
var valuesPath = Directory.EnumerateFiles(workspace.
Path
, "values.yaml", SearchOption.AllDirectories).Single();
AzureKubernetesIngressTests.cs (1)
32
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
AzureKubernetesPersistentVolumeTests.cs (3)
40
var claimPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
92
var claimPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
96
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "service", "statefulset.yaml");
AzureKubernetesTestBuilder.cs (1)
29
.Create(operation, workspace.
Path
, step: step)
Aspire.Hosting.Azure.Kusto.Tests (2)
KustoFunctionalTests.cs (2)
247
container.WithBindMount(workspace.
Path
, dbPath);
271
return Directory.GetFileSystemEntries(workspace.
Path
, searchPattern, enumerationOptions);
Aspire.Hosting.Azure.Tests (84)
AzureAppServiceTests.cs (10)
238
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "validate-appservice-config-env");
279
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "validate-appservice-config-env");
311
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "validate-appservice-config-env");
614
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
630
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
634
var envBicepPath = Path.Combine(workspace.
Path
, "env", "env.bicep");
638
var apiBicepPath = Path.Combine(workspace.
Path
, "api", "api.bicep");
810
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "publish-manifest");
831
Path.Combine(workspace.
Path
, "aspire-manifest.json"),
840
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
AzureBicepResourceTests.cs (4)
257
var bicepFilePath = Path.Combine(workspace.
Path
, bicepFileName);
264
var outputDir = Path.Combine(workspace.
Path
, "output");
282
var bicepFilePath = Path.Combine(workspace.
Path
, bicepFileName);
306
var outputDir = Path.Combine(workspace.
Path
, "output");
AzureContainerAppEnvironmentExtensionsTests.cs (3)
551
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
564
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
568
var envBicepPath = Path.Combine(workspace.
Path
, "env", "env.bicep");
AzureContainerAppExpressEndpointTests.cs (2)
200
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
235
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "main.bicep")));
AzureContainerAppsTests.cs (11)
1992
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "publish-manifest");
2010
await VerifyFile(Path.Combine(workspace.
Path
, "aspire-manifest.json"));
2114
workspace.
Path
,
2144
workspace.
Path
,
2264
workspace.
Path
,
2290
workspace.
Path
,
2319
workspace.
Path
,
2348
workspace.
Path
,
2798
File.WriteAllText(Path.Combine(workspace.
Path
, "Dockerfile"), "FROM alpine");
2800
builder.AddDockerfile("with-bind-mount", workspace.
Path
)
2801
.WithBindMount(workspace.
Path
, "/app/data");
AzureEnvironmentResourceTests.cs (22)
186
workspace.
Path
);
201
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
209
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
246
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
255
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
262
var outputPath = Path.Combine(workspace.
Path
, "exclude-main");
284
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
289
var context = await CreatePublishingContextAsync(app, workspace.
Path
);
300
Assert.True(File.Exists(Path.Combine(workspace.
Path
, resourceName, $"{resourceName}.bicep")));
301
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
309
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
316
var outputPath = Path.Combine(workspace.
Path
, "write-main");
341
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
355
var outputPath = Path.Combine(workspace.
Path
, "provider");
404
output, workspace.
Path
);
418
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
423
var includedStorageBicepPath = Path.Combine(workspace.
Path
, "included-storage", "included-storage.bicep");
427
var excludedStorageBicepPath = Path.Combine(workspace.
Path
, "excluded-storage", "excluded-storage.bicep");
437
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
449
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
462
remoteInvokeOptions.StartInfo.WorkingDirectory = workspace.
Path
;
463
using var handle = RemoteExecutor.Invoke(RunTest, workspace.
Path
, remoteInvokeOptions);
AzureFunctionsTests.cs (30)
315
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
338
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
363
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript)
387
builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
413
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript)
440
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.JavaScript)
466
builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
478
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
479
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock);
483
var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
512
var dockerfilePath = Path.Combine(tempDir.
Path
, "funcapp.Dockerfile");
532
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
533
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock);
537
await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
551
var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.
Path
, "funcapp.Dockerfile"));
564
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
565
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock: true);
570
var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
574
Assert.False(File.Exists(Path.Combine(tempDir.
Path
, "funcapp.Dockerfile")));
584
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
589
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock: true);
608
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
622
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.JavaScript);
973
var projectPath = Path.Combine(workspace.
Path
, "TestFunctions.csproj");
998
var projectPath = Path.Combine(workspace.
Path
, "MyFunctions.csproj");
1020
var projectPath = Path.Combine(workspace.
Path
, "TestFunctions.csproj");
1050
var projectPath1 = Path.Combine(workspace.
Path
, "Functions1.csproj");
1051
var projectPath2 = Path.Combine(workspace.
Path
, "Functions2.csproj");
1073
var projectPath = Path.Combine(workspace.
Path
, "Functions.csproj");
1105
var projectPath = Path.Combine(workspace.
Path
, "Functions.csproj");
AzureSandboxesTests.cs (2)
178
workspace.
Path
);
185
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
Aspire.Hosting.Docker.Tests (131)
DockerComposePublisherTests.cs (90)
25
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
100
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
101
var envPath = Path.Combine(workspace.
Path
, ".env");
113
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
123
var compose = File.ReadAllText(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
139
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
161
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
162
var envPath = Path.Combine(workspace.
Path
, ".env");
174
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
184
var compose = File.ReadAllText(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
185
var environment = File.ReadAllText(Path.Combine(workspace.
Path
, ".env"));
194
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
)
209
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
219
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "publish-docker-compose")
238
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
247
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
289
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
291
var envPath = Path.Combine(workspace.
Path
, ".env");
302
var envFilePath = Path.Combine(workspace.
Path
, ".env");
306
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
333
var envFilePath = Path.Combine(workspace.
Path
, ".env");
337
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
374
var envFilePath = Path.Combine(workspace.
Path
, ".env");
377
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
393
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
407
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
419
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
433
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
448
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
465
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
480
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
496
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
511
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
524
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
537
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
558
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
569
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
582
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
597
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
610
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
626
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
640
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
654
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
669
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
682
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
701
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
713
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
726
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
738
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, workspace.
Path
);
750
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
759
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
777
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
787
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
806
var envFilePath = Path.Combine(workspace.
Path
, ".env.Staging");
819
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
840
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
850
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
862
var envFilePath = Path.Combine(workspace.
Path
, ".env.Production");
883
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
896
var envFilePath = Path.Combine(workspace.
Path
, ".env.Staging");
913
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
929
var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
930
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
940
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
962
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
971
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
988
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
999
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1013
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1014
var envPath = Path.Combine(workspace.
Path
, ".env");
1027
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1040
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1056
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1071
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1072
var envPath = Path.Combine(workspace.
Path
, ".env");
1084
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1099
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1110
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1135
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1136
var envPath = Path.Combine(workspace.
Path
, ".env");
1149
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1183
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1184
var envPath = Path.Combine(workspace.
Path
, ".env");
1203
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1217
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1218
var envPath = Path.Combine(workspace.
Path
, ".env");
1230
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1261
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1271
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1295
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
DockerComposeTests.cs (25)
49
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
61
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
69
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
83
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
146
var outputPath = Path.Combine(workspace.
Path
, "output");
173
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
185
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
197
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
219
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
233
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
258
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
318
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: step);
345
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
372
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
420
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: step);
686
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "push-servicea");
717
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "push-servicea");
754
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
802
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
962
["OutputPath"] = workspace.
Path
,
964
["ComposeFilePath"] = Path.Combine(workspace.
Path
, "docker-compose.yaml")
968
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
1005
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
1037
var deployBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Deploy);
1061
var destroyBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
EnvFileTests.cs (16)
16
var envFilePath = Path.Combine(workspace.
Path
, ".env");
50
var envFilePath = Path.Combine(workspace.
Path
, ".env");
70
var envFilePath = Path.Combine(workspace.
Path
, ".env");
88
var envFilePath = Path.Combine(workspace.
Path
, ".env");
108
var envFilePath = Path.Combine(workspace.
Path
, ".env");
123
var envFilePath = Path.Combine(workspace.
Path
, ".env");
145
var envFilePath = Path.Combine(workspace.
Path
, ".env");
165
var envFilePath = Path.Combine(workspace.
Path
, ".env");
185
var envFilePath = Path.Combine(workspace.
Path
, ".env");
212
var envFilePath = Path.Combine(workspace.
Path
, ".env");
228
var envFilePath = Path.Combine(workspace.
Path
, ".env");
254
var envFilePath = Path.Combine(workspace.
Path
, ".env");
280
var envFilePath = Path.Combine(workspace.
Path
, ".env");
320
var envFilePath = Path.Combine(workspace.
Path
, ".env");
345
var envFilePath = Path.Combine(workspace.
Path
, ".env");
362
var envFilePath = Path.Combine(workspace.
Path
, ".env");
Aspire.Hosting.Dotnet.Tests (287)
DotnetProjectBuildArtifactManagerTests.cs (7)
18
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
45
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
78
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
114
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
139
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
153
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
168
var buildDirectory = Path.Combine(workspace.
Path
, ".aspire", "build");
DotnetProjectBuildCoordinatorTests.cs (241)
39
options => options.ProjectDirectory = workspace.
Path
,
101
options => options.ProjectDirectory = workspace.
Path
,
104
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
132
var globalJsonPath = Path.Combine(workspace.
Path
, "global.json");
137
options => options.ProjectDirectory = workspace.
Path
,
146
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
193
options => options.ProjectDirectory = workspace.
Path
,
203
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
204
var firstDotnetPath = Path.Combine(workspace.
Path
, "first-sdk");
205
var secondDotnetPath = Path.Combine(workspace.
Path
, "second-sdk");
263
options => options.ProjectDirectory = workspace.
Path
,
275
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
292
options => options.ProjectDirectory = workspace.
Path
,
301
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
319
options => options.ProjectDirectory = workspace.
Path
,
324
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
338
options => options.ProjectDirectory = workspace.
Path
,
347
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
363
options => options.ProjectDirectory = workspace.
Path
,
365
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
406
options => options.ProjectDirectory = workspace.
Path
,
409
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
476
options => options.ProjectDirectory = workspace.
Path
,
479
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
480
var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "worker"));
565
options => options.ProjectDirectory = workspace.
Path
,
567
var sharedProject = CreateSharedProject(workspace.
Path
);
568
var firstPath = CreateFileApp(workspace.
Path
, "First", sharedProject);
569
var secondPath = CreateFileApp(workspace.
Path
, "Second", sharedProject);
570
var firstSentinel = Path.Combine(workspace.
Path
, "first-ran.txt");
571
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
636
var appPath = Path.Combine(workspace.
Path
, "worker.cs");
637
var sentinelPath = Path.Combine(workspace.
Path
, "worker-ran.txt");
641
options => options.ProjectDirectory = workspace.
Path
,
720
options => options.ProjectDirectory = workspace.
Path
,
722
var firstProject = CreateProject(workspace.
Path
, "First's Project", "First.csproj");
723
var secondProject = CreateProject(workspace.
Path
, "Second", "Second.csproj");
752
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
753
var customTargetsPath = Path.Combine(workspace.
Path
, "CustomNuGet.targets");
763
workspace.
Path
,
764
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
768
workspace.
Path
,
776
WorkingDirectory = workspace.
Path
,
807
var projectPath = CreateProjectFile(workspace.
Path
, "Service", """
816
workspace.
Path
,
817
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
821
workspace.
Path
,
827
var missingTargetsPath = Path.Combine(workspace.
Path
, "missing", "NuGet.targets");
830
WorkingDirectory = workspace.
Path
,
863
using var builder = TestDistributedApplicationBuilder.Create(options => options.ProjectDirectory = workspace.
Path
, outputHelper);
864
var aspireStoreRoot = Path.Combine(workspace.
Path
, "custom-obj");
866
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
882
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
883
var buildDirectory = Path.Combine(workspace.
Path
, "obj", ".aspire", "build");
884
using var unified = new DotnetProjectBuildResource("unified", workspace.
Path
, buildDirectory, TimeProvider.System);
885
using var individual = new DotnetProjectBuildResource("individual", workspace.
Path
, buildDirectory, TimeProvider.System);
886
unified.ConfigureTraversalBuild([projectPath], workspace.
Path
, buildConfiguration: null, restoreProjectsIndividually: false);
887
individual.ConfigureTraversalBuild([projectPath], workspace.
Path
, buildConfiguration: null, restoreProjectsIndividually: true);
905
options => options.ProjectDirectory = workspace.
Path
,
907
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1004
workspace.
Path
,
1005
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1009
workspace.
Path
,
1058
workspace.
Path
,
1059
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1061
var projectPath = CreateProject(workspace.
Path
, "Service", "App.csproj");
1062
var caseVariantPath = Path.Combine(workspace.
Path
, "service", "app.CSPROJ");
1066
CreateProject(workspace.
Path
, "service", "app.CSPROJ");
1089
options => options.ProjectDirectory = workspace.
Path
,
1091
var aspireStoreRoot = Path.Combine(workspace.
Path
, "custom-obj");
1093
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1094
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1146
options => options.ProjectDirectory = workspace.
Path
,
1148
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1149
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1169
options => options.ProjectDirectory = workspace.
Path
,
1171
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1172
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1192
options => options.ProjectDirectory = workspace.
Path
,
1194
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1195
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1221
options => options.ProjectDirectory = workspace.
Path
,
1223
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1224
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1243
options => options.ProjectDirectory = workspace.
Path
,
1245
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1246
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1269
options => options.ProjectDirectory = workspace.
Path
,
1287
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1307
options => options.ProjectDirectory = workspace.
Path
,
1309
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1336
options => options.ProjectDirectory = workspace.
Path
,
1338
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1370
options => options.ProjectDirectory = workspace.
Path
,
1372
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1410
options => options.ProjectDirectory = workspace.
Path
,
1412
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1481
options => options.ProjectDirectory = workspace.
Path
,
1483
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1484
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1511
options => options.ProjectDirectory = workspace.
Path
,
1513
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1534
options => options.ProjectDirectory = workspace.
Path
,
1536
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1556
options => options.ProjectDirectory = workspace.
Path
,
1558
var appPath = Path.Combine(workspace.
Path
, "app.cs");
1576
options => options.ProjectDirectory = workspace.
Path
,
1578
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1617
options => options.ProjectDirectory = workspace.
Path
,
1619
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1742
options => options.ProjectDirectory = workspace.
Path
,
1744
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1823
options => options.ProjectDirectory = workspace.
Path
,
1825
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1874
options => options.ProjectDirectory = workspace.
Path
,
1876
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1944
options => options.ProjectDirectory = workspace.
Path
,
1946
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1973
options => options.ProjectDirectory = workspace.
Path
,
1975
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1976
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2014
options => options.ProjectDirectory = workspace.
Path
,
2016
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2018
var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime")).FullName;
2019
var sdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime")).FullName;
2063
options => options.ProjectDirectory = workspace.
Path
,
2065
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2067
var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime-1")).FullName;
2068
var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime-2")).FullName;
2108
options => options.ProjectDirectory = workspace.
Path
,
2110
var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "source")).FullName;
2114
var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime")).FullName;
2133
options => options.ProjectDirectory = workspace.
Path
,
2136
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "source")).FullName,
2140
var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "foreign")).FullName;
2168
options => options.ProjectDirectory = workspace.
Path
,
2170
var activePath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
2171
var removedPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
2192
options => options.ProjectDirectory = workspace.
Path
,
2194
var activePath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
2195
var replacedPath = CreateProject(workspace.
Path
, "Replaced", "Replaced.csproj");
2202
@event.Model.Resources[index] = new ExecutableResource(replaced.Resource.Name, "dotnet", workspace.
Path
);
2218
options => options.ProjectDirectory = workspace.
Path
,
2220
var projectPath = CreateProject(workspace.
Path
, "Project", "Project.csproj");
2221
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
2268
options => options.ProjectDirectory = workspace.
Path
,
2270
var firstPath = CreateProject(workspace.
Path
, "First", "First.csproj");
2271
var secondPath = CreateProject(workspace.
Path
, "Second", "Second.csproj");
2315
options => options.ProjectDirectory = workspace.
Path
,
2317
var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "Physical"));
2327
var linkPath = Path.Combine(workspace.
Path
, "Alias");
2338
var otherProjectPath = CreateProject(workspace.
Path
, "Other", "Other.csproj");
2365
options => options.ProjectDirectory = workspace.
Path
,
2367
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
2389
options => options.ProjectDirectory = workspace.
Path
,
2391
var removedProjectPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
2398
var activeProjectPath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
2419
options => options.ProjectDirectory = workspace.
Path
,
2421
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
2449
options => options.ProjectDirectory = workspace.
Path
,
2451
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
2482
options => options.ProjectDirectory = workspace.
Path
,
2484
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
2515
options => options.ProjectDirectory = workspace.
Path
,
2517
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
2540
options => options.ProjectDirectory = workspace.
Path
,
2542
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
2543
var removedPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
2544
var missingPath = Path.Combine(workspace.
Path
, "Missing", "Missing.csproj");
2567
options => options.ProjectDirectory = workspace.
Path
,
2569
var firstPath = CreateProject(workspace.
Path
, "First", "First.csproj");
2570
var secondPath = CreateProject(workspace.
Path
, "Second", "Second.csproj");
2626
options => options.ProjectDirectory = workspace.
Path
,
2628
var projectPath = CreateProject(workspace.
Path
, "Service", "App.csproj");
2629
var linkDirectory = Path.Combine(workspace.
Path
, "ServiceAlias");
2668
workspace.
Path
,
2669
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
2671
buildResource.AddProject(CreateProject(workspace.
Path
, "Api", "Api.csproj"));
2710
var sharedProject = CreateSharedProject(workspace.
Path
);
2711
var apiProject = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
2712
var workerProject = CreateConsoleProject(workspace.
Path
, "Worker", sharedProject);
2713
var escapedDirectory = Path.Combine(workspace.
Path
, "Api's Project 100% (test)");
2716
var apiSentinel = Path.Combine(workspace.
Path
, "api-ran.txt");
2717
var workerSentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
2720
options => options.ProjectDirectory = workspace.
Path
,
2771
var sharedProject = CreateSharedProject(workspace.
Path
);
2772
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
2780
var sentinels = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "instances")).FullName;
2782
options => options.ProjectDirectory = workspace.
Path
,
2823
var projectPath = CreateBrokenProject(workspace.
Path
, "REPLICAS_BUILD_FAILED");
2825
options => options.ProjectDirectory = workspace.
Path
,
2857
var firstProject = CreateSentinelProject(workspace.
Path
, "First", """
2862
var secondProject = CreateSentinelProject(workspace.
Path
, "Second", """
2868
var firstSentinel = Path.Combine(workspace.
Path
, "first-ran.txt");
2869
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
2872
options => options.ProjectDirectory = workspace.
Path
,
2912
var brokenProject = CreateBrokenProject(workspace.
Path
, "FIRST_BUILD_FAILED");
2913
var secondBuildMarker = Path.Combine(workspace.
Path
, "second-built.txt");
2914
var secondProject = CreateSentinelProject(workspace.
Path
, "Second", $$"""
2919
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
2922
options => options.ProjectDirectory = workspace.
Path
,
2967
var validProject = CreateProjectFile(workspace.
Path
, "Valid", """
2978
var sentinelPath = Path.Combine(workspace.
Path
, "valid-ran.txt");
2979
var missingProject = Path.Combine(workspace.
Path
, "Missing", "Missing.csproj");
2982
options => options.ProjectDirectory = workspace.
Path
,
3022
options => options.ProjectDirectory = workspace.
Path
,
3030
var missingPath = Path.Combine(workspace.
Path
, "Missing", $"Missing.{extension}");
3055
var projectPath = CreateProjectFile(workspace.
Path
, "EnvironmentBuild", """
3078
var sentinelPath = Path.Combine(workspace.
Path
, "environment-build-ran.txt");
3091
options => options.ProjectDirectory = workspace.
Path
,
3129
var projectPath = CreateProjectWithBuildProducedRunPropertiesSentinel(workspace.
Path
);
3132
options => options.ProjectDirectory = workspace.
Path
,
3185
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3186
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
3189
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
3218
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3220
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
3290
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3292
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
3334
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3336
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
3369
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3371
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
3418
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3419
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
3422
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
3452
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3453
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
3456
options => options.ProjectDirectory = workspace.
Path
,
3510
var projectPath = CreateProject(workspace.
Path
, "EnvironmentBuild", "EnvironmentBuild.csproj");
3513
options => options.ProjectDirectory = workspace.
Path
,
3519
Path.Combine(workspace.
Path
, "missing-dotnet");
3554
var brokenProject = CreateBrokenProject(workspace.
Path
, buildLogMarker);
3555
var fileApp = Path.Combine(workspace.
Path
, "worker.cs");
3556
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
3566
options => options.ProjectDirectory = workspace.
Path
,
3617
var releaseBuild = Path.Combine(workspace.
Path
, "release-build");
3618
var brokenProject = CreateGatedBrokenProject(workspace.
Path
, releaseBuild);
3619
var fileApp = Path.Combine(workspace.
Path
, "worker.cs");
3620
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
3630
options => options.ProjectDirectory = workspace.
Path
,
DotnetProjectOptionsTests.cs (3)
26
var projectPath = await CreateProjectAsync(workspace.
Path
, includeKestrel: false);
49
var projectPath = await CreateProjectAsync(workspace.
Path
, includeKestrel: false);
71
var projectPath = await CreateProjectAsync(workspace.
Path
, includeKestrel: true);
DotnetProjectResourceTests.cs (31)
169
"project" => CreateFile(workspace.
Path
, "MyService.csproj"),
170
"directory" => CreateProjectDirectory(workspace.
Path
),
171
"file" => CreateFile(workspace.
Path
, "service.cs"),
178
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
180
var expectedPath = Path.GetRelativePath(workspace.
Path
, metadata.ProjectPath).Replace('\\', '/');
194
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
211
var resource = new DotnetProjectResource("svc", workspace.
Path
);
213
() => ManifestUtils.GetManifest(resource, workspace.
Path
));
225
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
233
var manifest = await ManifestUtils.GetManifestOrNull(resource.Resource, workspace.
Path
);
241
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
249
var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.
Path
);
257
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
258
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "Dockerfile"), "FROM scratch");
267
var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.
Path
);
297
var appPath = Path.Combine(workspace.
Path
, "app.cs");
304
var archivePath = Path.Combine(workspace.
Path
, "app.tar.gz");
334
var sentinelDockerfilePath = Path.Combine(workspace.
Path
, "Dockerfile.sentinel");
335
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "sentinel.txt"), marker, cancellation.Token);
338
workspace.
Path
,
382
var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "project"));
398
var archivePath = Path.Combine(workspace.
Path
, "project.tar.gz");
425
var projectPath = Path.Combine(workspace.
Path
, "Project.csproj");
432
context.OutputPath = Path.Combine(workspace.
Path
, "project.tar");
451
var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "project"));
453
var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime"));
477
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
495
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "AmbiguousService"));
562
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
665
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
735
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
DotnetProjectRunPropertiesResolverTests.cs (5)
20
var projectPath = Path.Combine(workspace.
Path
, "Broken.csproj");
39
workspace.
Path
,
55
var projectPath = Path.Combine(workspace.
Path
, "Warning.csproj");
73
workspace.
Path
,
77
Assert.Equal(new("dotnet", "exec app.dll", Path.Combine(workspace.
Path
, "bin")), result);
Aspire.Hosting.Go.Tests (11)
GoVersionDetectorTests.cs (11)
13
var version = GoVersionDetector.Detect(workspace.
Path
);
22
File.WriteAllText(Path.Combine(workspace.
Path
, "go.mod"), "module example.com/m\n\ngo 1.23\n");
24
var version = GoVersionDetector.Detect(workspace.
Path
);
33
File.WriteAllText(Path.Combine(workspace.
Path
, "go.mod"), "module example.com/m\n\ngo 1.23.4\n");
35
var version = GoVersionDetector.Detect(workspace.
Path
);
44
File.WriteAllText(Path.Combine(workspace.
Path
, "go.mod"),
47
var version = GoVersionDetector.Detect(workspace.
Path
);
57
File.WriteAllText(Path.Combine(workspace.
Path
, "go.mod"),
60
var version = GoVersionDetector.Detect(workspace.
Path
);
69
File.WriteAllText(Path.Combine(workspace.
Path
, "go.mod"), "module example.com/m\n");
71
var version = GoVersionDetector.Detect(workspace.
Path
);
Aspire.Hosting.Java.Tests (4)
AddJavaAppPublishTests.cs (4)
46
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "build", "libs"));
50
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "build", "libs", "reports service.jar"), "");
52
var destination = Path.Combine(workspace.
Path
, "app.jar");
58
WorkingDirectory = workspace.
Path
,
Aspire.Hosting.JavaScript.Tests (486)
AddBunAppTests.cs (31)
32
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
34
var appDir = Path.Combine(workspace.
Path
, "js");
44
await ManifestUtils.GetManifest(bunApp.Resource, workspace.
Path
);
46
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
60
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
62
var appDir = Path.Combine(workspace.
Path
, "js");
71
await ManifestUtils.GetManifest(bunApp.Resource, workspace.
Path
);
73
await Verify(File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile")));
80
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
82
var appDir = Path.Combine(workspace.
Path
, "js");
88
await ManifestUtils.GetManifest(bunApp.Resource, workspace.
Path
);
93
var perDockerfileIgnorePath = Path.Combine(workspace.
Path
, "js.Dockerfile.dockerignore");
111
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
113
var appDir = Path.Combine(workspace.
Path
, "js");
119
await ManifestUtils.GetManifest(bunApp.Resource, workspace.
Path
);
121
var perDockerfileIgnorePath = Path.Combine(workspace.
Path
, "js.Dockerfile.dockerignore");
131
await ManifestUtils.GetManifest(bunApp.Resource, workspace.
Path
);
143
File.WriteAllText(Path.Combine(workspace.
Path
, "server.ts"), "console.log('hi');");
147
builder.AddBunApp("bunapp", workspace.
Path
, "server.ts");
165
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
169
builder.AddBunApp("bunapp", workspace.
Path
, "server.ts");
217
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts");
309
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts");
322
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts");
334
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts")
349
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
351
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts")
364
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts");
371
Assert.Equal(Path.GetFullPath("server.ts", workspace.
Path
), launchConfig.ScriptPath);
382
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
384
var bunApp = builder.AddBunApp("bunapp", workspace.
Path
, "server.ts")
AddDenoAppTests.cs (221)
60
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
62
var appDir = Path.Combine(workspace.
Path
, "js");
72
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
74
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
88
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
90
var appDir = Path.Combine(workspace.
Path
, "js");
99
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
101
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
111
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
113
var appDir = Path.Combine(workspace.
Path
, "js");
119
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
124
var perDockerfileIgnorePath = Path.Combine(workspace.
Path
, "js.Dockerfile.dockerignore");
143
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
145
var appDir = Path.Combine(workspace.
Path
, "js");
150
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
152
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
178
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
180
var appDir = Path.Combine(workspace.
Path
, "js");
187
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
189
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
198
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
200
var appDir = Path.Combine(workspace.
Path
, "js");
210
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
212
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
222
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
224
var appDir = Path.Combine(workspace.
Path
, "js");
236
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
238
await Verify(File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile")));
245
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
247
var appDir = Path.Combine(workspace.
Path
, "js");
254
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
256
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
265
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
267
var appDir = Path.Combine(workspace.
Path
, "js");
279
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
281
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
292
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
294
var appDir = Path.Combine(workspace.
Path
, "js");
303
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
305
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
318
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
320
var appDir = Path.Combine(workspace.
Path
, "js");
334
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
336
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
349
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
351
var appDir = Path.Combine(workspace.
Path
, "js");
358
() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
369
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
371
var appDir = Path.Combine(workspace.
Path
, "js");
378
() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
389
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
391
var appDir = Path.Combine(workspace.
Path
, "js");
399
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
401
var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.
Path
, "js.Dockerfile"));
413
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
415
var appDir = Path.Combine(workspace.
Path
, "js");
424
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
426
var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.
Path
, "js.Dockerfile"));
438
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
440
var appDir = Path.Combine(workspace.
Path
, "js");
444
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
446
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
456
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
458
var appDir = Path.Combine(workspace.
Path
, "js");
463
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
465
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
475
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
477
var appDir = Path.Combine(workspace.
Path
, "js");
484
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
486
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
502
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
504
var appDir = Path.Combine(workspace.
Path
, "js");
511
() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
521
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
523
var appDir = Path.Combine(workspace.
Path
, "js");
530
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
532
Assert.False(File.Exists(Path.Combine(workspace.
Path
, "js.Dockerfile")));
539
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
541
var appDir = Path.Combine(workspace.
Path
, "js");
551
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
553
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
566
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
568
var appDir = Path.Combine(workspace.
Path
, "js");
582
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
584
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
609
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
611
var appDir = Path.Combine(workspace.
Path
, "js");
618
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
622
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
630
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
632
var appDir = Path.Combine(workspace.
Path
, "js");
639
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
643
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
651
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
653
var appDir = Path.Combine(workspace.
Path
, "js");
662
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
664
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
673
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
675
var appDir = Path.Combine(workspace.
Path
, "js");
684
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
687
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
695
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
697
var appDir = Path.Combine(workspace.
Path
, "js");
706
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
708
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
724
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
726
var appDir = Path.Combine(workspace.
Path
, "js");
744
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
746
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
755
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
757
var appDir = Path.Combine(workspace.
Path
, "js");
765
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
767
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
859
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
861
var appDir = Path.Combine(workspace.
Path
, "js");
871
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
873
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
883
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
885
var appDir = Path.Combine(workspace.
Path
, "js");
892
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
894
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
902
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
904
var appDir = Path.Combine(workspace.
Path
, "js");
911
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
913
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
921
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
923
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
926
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
));
935
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
937
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
941
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
));
950
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
952
var appDir = Path.Combine(workspace.
Path
, "js");
959
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
961
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
971
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
973
var appDir = Path.Combine(workspace.
Path
, "js");
982
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
984
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
994
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
996
var appDir = Path.Combine(workspace.
Path
, "js");
1003
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1005
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1020
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1022
var appDir = Path.Combine(workspace.
Path
, "js");
1028
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1030
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1038
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1040
var appDir = Path.Combine(workspace.
Path
, "js");
1047
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1049
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1059
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1061
var appDir = Path.Combine(workspace.
Path
, "js");
1068
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1070
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1080
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1082
var appDir = Path.Combine(workspace.
Path
, "js");
1091
var manifest = await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1094
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1106
var appDir = Path.Combine(workspace.
Path
, "js");
1124
var appDir = Path.Combine(workspace.
Path
, "js");
1151
var appDir = Path.Combine(workspace.
Path
, "js");
1180
var appDir = Path.Combine(workspace.
Path
, "js");
1199
var appDir = Path.Combine(workspace.
Path
, "js");
1226
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1228
var appDir1 = Path.Combine(workspace.
Path
, "js1");
1229
var appDir2 = Path.Combine(workspace.
Path
, "js2");
1241
await ManifestUtils.GetManifest(denoApp2.Resource, workspace.
Path
);
1243
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js2.Dockerfile"));
1253
File.WriteAllText(Path.Combine(workspace.
Path
, "main.ts"), "console.log('hi');");
1257
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1275
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
1279
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1302
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
1306
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1324
File.WriteAllText(Path.Combine(workspace.
Path
, "main.ts"), "console.log('hi');");
1327
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1492
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
1507
var app = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
1524
var app = builder.AddJavaScriptApp("js", workspace.
Path
)
1541
var app = builder.AddJavaScriptApp("js", workspace.
Path
)
1559
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
1576
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1578
var appDir = Path.Combine(workspace.
Path
, "js");
1585
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1587
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1600
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1602
var appDir = Path.Combine(workspace.
Path
, "js");
1610
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1612
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1627
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1629
var appDir = Path.Combine(workspace.
Path
, "js");
1636
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1638
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1647
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1649
var appDir = Path.Combine(workspace.
Path
, "js");
1655
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1657
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1682
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1684
var appDir = Path.Combine(workspace.
Path
, "js");
1691
() => ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
));
2295
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2335
var exception = Assert.Throws<ArgumentException>(() => builder.AddDenoApp("denoapp", workspace.
Path
, scriptPath));
2346
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
2348
var appDir = Path.Combine(workspace.
Path
, "deno-app");
2357
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
2359
var dockerfilePath = Path.Combine(workspace.
Path
, "deno-app.Dockerfile");
2529
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2542
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2554
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2568
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2575
Assert.Equal(Path.GetFullPath("main.ts", workspace.
Path
), launchConfig.ScriptPath);
2586
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
2588
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2604
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
2606
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2623
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
2625
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2642
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2658
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2677
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
AddJavaScriptAppTests.cs (80)
24
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
26
var appDir = Path.Combine(workspace.
Path
, "js");
33
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
35
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
46
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
48
var appDir = Path.Combine(workspace.
Path
, "js");
56
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
58
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
66
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
68
var appDir = Path.Combine(workspace.
Path
, "js");
76
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
78
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
86
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
88
var appDir = Path.Combine(workspace.
Path
, "js");
96
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
98
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
108
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
111
var appDir = Path.Combine(workspace.
Path
, "js");
123
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
125
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
135
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
137
var appDir = Path.Combine(workspace.
Path
, "js");
144
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
146
var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
169
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
171
var appDir = Path.Combine(workspace.
Path
, "js");
184
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
186
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
196
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
198
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
202
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
213
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
215
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
221
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.
Path
));
232
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
234
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
239
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
253
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
277
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
279
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
283
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
292
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
294
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
301
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
311
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
313
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
320
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
329
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
331
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
336
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
347
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
349
var appDir = Path.Combine(workspace.
Path
, "js");
358
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
360
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
378
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
380
var appDir = Path.Combine(workspace.
Path
, "js");
394
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
396
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
412
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
414
var appDir = Path.Combine(workspace.
Path
, "js");
429
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
431
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
444
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
446
var appDir = Path.Combine(workspace.
Path
, "js");
460
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
462
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
473
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
475
var appDir = Path.Combine(workspace.
Path
, "js");
489
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
491
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
512
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
514
var appDir = Path.Combine(workspace.
Path
, "js");
538
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
541
var appDir = Path.Combine(workspace.
Path
, "pnpm-app");
561
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
563
var dockerfilePath = Path.Combine(workspace.
Path
, "pnpm-app.Dockerfile");
634
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
636
var appDir = Path.Combine(workspace.
Path
, "pnpm-app");
657
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
659
var dockerfilePath = Path.Combine(workspace.
Path
, "pnpm-app.Dockerfile");
AddNodeAppTests.cs (28)
97
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
99
var appDir = Path.Combine(workspace.
Path
, "js");
110
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
112
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
165
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
167
var appDir = Path.Combine(workspace.
Path
, "js");
179
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
181
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
212
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
214
var appDir = Path.Combine(workspace.
Path
, "js");
224
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
227
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
236
File.WriteAllText(Path.Combine(workspace.
Path
, "app.js"), "{}");
240
builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
263
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
267
builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
440
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
453
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
465
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
);
478
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
)
505
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
)
522
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
)
539
var resource = new JavaScriptAppResource("jsapp", "npm", workspace.
Path
);
560
File.WriteAllText(Path.Combine(workspace.
Path
, "app.js"), "console.log('hello');");
562
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js")
598
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
605
Assert.Equal(Path.GetFullPath("app.js", workspace.
Path
), launchConfig.ScriptPath);
614
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
);
AddViteAppTests.cs (101)
23
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
26
var viteDir = Path.Combine(workspace.
Path
, "vite");
35
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
61
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
85
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
87
var viteDir = Path.Combine(workspace.
Path
, "vite");
95
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
97
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
111
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
113
var viteDir = Path.Combine(workspace.
Path
, "vite");
117
var apiDir = Path.Combine(workspace.
Path
, "api");
128
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
130
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
138
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
140
var viteDir = Path.Combine(workspace.
Path
, "vite");
159
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
161
var viteDir = Path.Combine(workspace.
Path
, "vite");
165
var apiDir = Path.Combine(workspace.
Path
, "api");
189
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
191
var appDir = Path.Combine(workspace.
Path
, "angular");
199
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
201
var dockerfilePath = Path.Combine(workspace.
Path
, "angular.Dockerfile");
215
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
217
var appDir = Path.Combine(workspace.
Path
, "vite");
225
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
227
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
238
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
240
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
247
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
249
var dockerfilePath = Path.Combine(workspace.
Path
, "nextjs.Dockerfile");
259
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
261
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
268
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
270
var dockerfilePath = Path.Combine(workspace.
Path
, "nextjs.Dockerfile");
278
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
280
var appDir = Path.Combine(workspace.
Path
, "nuxt");
288
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
290
var dockerfilePath = Path.Combine(workspace.
Path
, "nuxt.Dockerfile");
298
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
300
var appDir = Path.Combine(workspace.
Path
, "nuxt");
308
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
310
var dockerfilePath = Path.Combine(workspace.
Path
, "nuxt.Dockerfile");
320
File.WriteAllText(Path.Combine(workspace.
Path
, ".nvmrc"), "18.20.0");
322
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
323
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
326
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
328
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
340
File.WriteAllText(Path.Combine(workspace.
Path
, ".node-version"), "v21.5.0");
342
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
343
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
346
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
348
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
365
File.WriteAllText(Path.Combine(workspace.
Path
, ".tool-versions"), toolVersions);
367
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
368
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
371
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
373
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
391
File.WriteAllText(Path.Combine(workspace.
Path
, ".tool-versions"), toolVersions);
393
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
394
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
397
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
399
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
417
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), packageJson);
419
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
420
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
423
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
425
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
436
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
437
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
440
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
442
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
458
File.WriteAllText(Path.Combine(workspace.
Path
, ".nvmrc"), versionString);
460
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
461
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
464
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
466
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
475
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
478
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
482
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
488
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
546
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
549
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
553
var viteApp = builder.AddViteApp("test-app", workspace.
Path
)
607
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
610
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
614
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
666
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
711
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
715
builder.AddViteApp("test-app", workspace.
Path
);
754
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
757
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
761
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
809
var repoRoot = Path.Combine(workspace.
Path
, "repo");
885
var repoRoot = Path.Combine(workspace.
Path
, "repo");
948
var repoRoot = Path.Combine(workspace.
Path
, "repo");
994
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
997
var viteConfigPath = Path.Combine(workspace.
Path
, configFileName);
1001
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
1048
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
1064
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
1081
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
PackageInstallationTests.cs (15)
458
File.WriteAllText(Path.Combine(workspace.
Path
, "package-lock.json"), "empty");
462
var app = builder.AddViteApp("test-app", workspace.
Path
)
485
File.WriteAllText(Path.Combine(workspace.
Path
, "yarn.lock"), "empty");
489
var app = builder.AddViteApp("test-app", workspace.
Path
)
495
var app2 = builder.AddViteApp("test-app2", workspace.
Path
)
506
File.WriteAllText(Path.Combine(workspace.
Path
, "yarn.lock"), "empty");
507
File.WriteAllText(Path.Combine(workspace.
Path
, ".yarnrc.yml"), "empty");
511
var app = builder.AddViteApp("test-app", workspace.
Path
)
522
File.WriteAllText(Path.Combine(workspace.
Path
, "yarn.lock"), "empty");
523
Directory.CreateDirectory(Path.Combine(workspace.
Path
, ".yarn", "releases"));
527
var app = builder.AddViteApp("test-app", workspace.
Path
)
538
File.WriteAllText(Path.Combine(workspace.
Path
, "pnpm-lock.yaml"), "empty");
542
var app = builder.AddViteApp("test-app", workspace.
Path
)
553
File.WriteAllText(Path.Combine(workspace.
Path
, "bun.lock"), "empty");
557
var app = builder.AddViteApp("test-app", workspace.
Path
)
RequiredCommandTests.cs (10)
30
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js");
42
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js")
54
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js")
67
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js")
158
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
160
var app = builder.AddBunApp("app", workspace.
Path
, "server.ts");
171
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
173
var app = builder.AddDenoApp("app", workspace.
Path
, "server.ts");
184
var app = builder.AddDenoApp("app", workspace.
Path
, "server.ts")
197
var app = builder.AddBunApp("app", workspace.
Path
, "server.ts")
Aspire.Hosting.Keycloak.Tests (2)
KeycloakPublicApiTests.cs (2)
158
keycloak.WithRealmImport(workspace.
Path
);
177
var filePath = Path.Combine(workspace.
Path
, file);
Aspire.Hosting.Kubernetes.Tests (270)
KubernetesDeployTests.cs (58)
307
workspace.
Path
,
348
workspace.
Path
,
388
workspace.
Path
,
429
workspace.
Path
,
469
workspace.
Path
,
504
workspace.
Path
,
540
workspace.
Path
,
564
workspace.
Path
,
589
workspace.
Path
,
796
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
830
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
844
var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "Chart.yaml"));
857
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
875
var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "Chart.yaml"));
888
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
897
var deploymentYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "svc", "deployment.yaml"));
911
workspace.
Path
,
938
var outputPath = Path.Combine(workspace.
Path
, "env");
985
var outputPath = Path.Combine(workspace.
Path
, "env");
1005
var outputPath = Path.Combine(workspace.
Path
, "env");
1079
var outputPath = Path.Combine(workspace.
Path
, "env");
1130
workspace.
Path
,
1163
workspace.
Path
,
1236
var outputPath = Path.Combine(workspace.
Path
, "env");
1286
var outputPath = Path.Combine(workspace.
Path
, "env");
1309
workspace.
Path
,
1335
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1358
var serverSecretsTemplatePath = Path.Combine(workspace.
Path
, "templates", "server", "secrets.yaml");
1380
workspace.
Path
,
1410
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1437
var outputPath = Path.Combine(workspace.
Path
, "deploy");
1499
workspace.
Path
,
1525
workspace.
Path
, env, CancellationToken.None);
1527
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1553
workspace.
Path
,
1586
workspace.
Path
, env, CancellationToken.None);
1588
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1599
workspace.
Path
,
1631
workspace.
Path
, env, CancellationToken.None);
1633
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1644
workspace.
Path
,
1671
workspace.
Path
, env, CancellationToken.None);
1673
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1674
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1676
await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "myapp", "config.yaml")),
1736
workspace.
Path
,
1751
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1773
workspace.
Path
,
1790
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1808
workspace.
Path
,
1825
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1844
workspace.
Path
,
1861
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1902
workspace.
Path
,
1933
workspace.
Path
,
1973
workspace.
Path
,
2018
workspace.
Path
,
2066
workspace.
Path
,
KubernetesEnvironmentResourceTests.cs (5)
19
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
29
var chartYaml = Path.Combine(workspace.
Path
, "Chart.yaml");
30
var valuesYaml = Path.Combine(workspace.
Path
, "values.yaml");
31
var deploymentYaml = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
95
var outputPath = Path.Combine(workspace.
Path
, "output");
KubernetesGatewayTests.cs (33)
18
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
34
var gatewayDir = Path.Combine(workspace.
Path
, "templates", "public");
61
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
75
var gatewayDir = Path.Combine(workspace.
Path
, "templates", "public");
88
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
106
var gatewayPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
107
var routePath = Path.Combine(workspace.
Path
, "templates", "public", "route.yaml");
108
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
119
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
136
var routePath = Path.Combine(workspace.
Path
, "templates", "public", "route.yaml");
145
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
175
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
210
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
239
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
256
var gatewayFile = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
274
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
291
var gatewayDir = Path.Combine(workspace.
Path
, "templates", "public");
300
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
322
var gatewayDir = Path.Combine(workspace.
Path
, "templates", "public");
335
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
356
var gatewayDir = Path.Combine(workspace.
Path
, "templates", "empty");
371
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
423
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
434
var templatesDir = Path.Combine(workspace.
Path
, "templates", "myapi");
446
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
464
var gatewayFile = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
496
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
513
var gatewayFile = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
533
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
558
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
580
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
596
var gatewayFile = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
613
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
KubernetesIngressTests.cs (48)
18
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
34
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
50
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
64
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
86
$"Pipeline:OutputPath={workspace.
Path
}",
108
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
115
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
132
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
149
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
160
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
177
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
178
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
188
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
204
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
213
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
228
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
237
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
253
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
265
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
282
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
295
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
315
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
328
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
343
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
353
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
367
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
380
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
393
var ingressDir = Path.Combine(workspace.
Path
, "templates", "empty");
406
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
439
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
459
var ingressDir = Path.Combine(workspace.
Path
, "templates", "public");
481
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
514
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
544
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
556
var ingressDir = Path.Combine(workspace.
Path
, "templates", "empty");
564
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
576
var templatesDir = Path.Combine(workspace.
Path
, "templates", "myapi");
587
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
612
var publicPath = Path.Combine(workspace.
Path
, "templates", "public-ingress", "public-ingress.yaml");
613
var internalPath = Path.Combine(workspace.
Path
, "templates", "internal-ingress", "internal-ingress.yaml");
629
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
647
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
664
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
682
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
733
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
758
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
781
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
798
var ingressPath = Path.Combine(workspace.
Path
, "templates", "public", "public.yaml");
KubernetesPublisherTests.cs (126)
27
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
62
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml")), "yaml")
70
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
119
var filePath = Path.Combine(workspace.
Path
, expectedFile);
139
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
158
var deploymentPath = Path.Combine(workspace.
Path
, "templates/service/deployment.yaml");
170
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
216
var filePath = Path.Combine(workspace.
Path
, expectedFile);
236
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
260
var manifestPath = Path.Combine(workspace.
Path
, "templates/myapp/scaler.yaml");
302
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
343
var filePath = Path.Combine(workspace.
Path
, expectedFile);
363
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
397
var filePath = Path.Combine(workspace.
Path
, expectedFile);
417
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
429
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
440
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
504
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
514
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
553
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
563
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
588
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
598
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
681
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
741
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
777
var filePath = Path.Combine(workspace.
Path
, expectedFile);
800
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
831
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
832
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "api", "deployment.yaml")), "yaml")
840
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
851
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
862
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
878
var publishedValues = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml"));
879
await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.
Path
, environment.Resource, CancellationToken.None);
882
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml")
890
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
900
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
909
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
923
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
933
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
947
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
955
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
967
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
968
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "worker", "deployment.yaml")), "yaml")
969
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "cache", "deployment.yaml")), "yaml");
976
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
984
await Verify(File.ReadAllText(Path.Combine(workspace.
Path
, "Chart.yaml")), "yaml")
985
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
986
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "deployment.yaml")), "yaml")
987
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "service.yaml")), "yaml")
988
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "config.yaml")), "yaml");
995
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1021
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1039
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1065
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1083
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1091
var servicePath = Path.Combine(workspace.
Path
, "templates/database/service.yaml");
1104
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1127
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1154
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1179
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1202
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1222
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1240
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1267
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1287
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1313
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1339
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1363
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1399
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1422
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1442
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1468
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1488
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1529
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1549
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1580
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1600
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1642
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1662
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1701
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1721
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1755
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1785
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1812
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1831
var legacyPv = Path.Combine(workspace.
Path
, "templates", "service", "data-pv.yaml");
1846
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1861
var deploymentPath = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
1879
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1906
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1919
var legacyPvc = Path.Combine(workspace.
Path
, "templates", "service", "data-pvc.yaml");
1923
var deploymentPath = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
1936
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1961
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1979
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2001
var claimPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2011
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2028
var omittedClaimPath = Path.Combine(workspace.
Path
, "templates", "omitted", "omitted.yaml");
2029
var emptyClaimPath = Path.Combine(workspace.
Path
, "templates", "empty", "empty.yaml");
2044
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2070
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", name, $"{name}.yaml"));
2083
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2108
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", name, $"{name}.yaml"));
2121
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2144
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "data", "data.yaml"));
2152
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2170
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
2180
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2197
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
2217
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2248
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2266
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2287
Assert.Equal("default-class", ReadStorageClassName(workspace.
Path
, "default"));
2288
Assert.Equal("explicit-class", ReadStorageClassName(workspace.
Path
, "explicit"));
2289
Assert.Null(ReadStorageClassName(workspace.
Path
, "omitted"));
2296
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2328
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2350
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2366
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "service", "statefulset.yaml");
2372
var pvcPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2390
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2421
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2436
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
2483
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2510
var pvcPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2522
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
Aspire.Hosting.Maui.Tests (64)
MauiiOSValidationTests.cs (6)
24
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
50
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
76
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
97
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
116
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
135
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
MauiOtlpTemplateTests.cs (3)
26
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
53
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
76
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
MauiPlatformExtensionsTests.cs (38)
97
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
120
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
140
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
159
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
188
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
236
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
255
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
279
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
308
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
334
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
357
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
380
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
403
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
431
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
456
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
485
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
510
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
537
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
564
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
631
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
661
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
685
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
708
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
746
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
799
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
864
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
903
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
956
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1022
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1059
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1076
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1098
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1129
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1156
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1186
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1268
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1304
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
1367
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
MauiUnsupportedPlatformTests.cs (6)
17
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
41
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
65
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
89
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
114
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
129
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
MauiWithArgsTests.cs (11)
21
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
39
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
58
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
78
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
95
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
115
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
132
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
151
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
168
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
188
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
210
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (1)
278
builder.Configuration["Aspire:Store:Path"] = workspace.
Path
;
MySqlFunctionalTests.cs (1)
572
.WithTempAspireStore(workspace.
Path
)
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (2)
503
builder.Configuration["Aspire:Store:Path"] = workspace.
Path
;
565
builder.Configuration["Aspire:Store:Path"] = workspace.
Path
;
PostgresFunctionalTests.cs (1)
559
.WithTempAspireStore(workspace.
Path
)
Aspire.Hosting.Python.Tests (109)
AddPythonAppTests.cs (109)
396
builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py"));
409
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
418
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
442
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
482
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
501
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
556
options.ProjectDirectory = workspace.
Path
;
602
options.ProjectDirectory = workspace.
Path
;
676
options.ProjectDirectory = workspace.
Path
;
731
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
741
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
762
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
782
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
820
var pythonBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
840
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
864
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
895
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
922
var pythonBuilder = builder.AddPythonApp("python-script", workspace.
Path
, "main.py");
941
var pythonBuilder = builder.AddPythonModule("flask-app", workspace.
Path
, "flask");
960
var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.
Path
, "pytest");
981
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
991
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1017
builder.AddPythonModule("pythonProject", workspace.
Path
, moduleName);
1025
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1051
builder.AddPythonExecutable("pythonProject", workspace.
Path
, executableName);
1059
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1082
var pythonBuilder = builder.AddPythonModule("flask-app", workspace.
Path
, "flask")
1106
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py")
1128
var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.
Path
, "pytest")
1150
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py")
1180
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py");
1227
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
1396
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1398
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1440
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1442
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1480
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1482
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1515
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1517
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1536
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1538
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1560
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1562
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1584
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1586
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1588
var customWorkingDirectory = Path.Combine(workspace.
Path
, "custom");
1611
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1613
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1615
var customWorkingDirectory = Path.Combine(workspace.
Path
, "custom");
1652
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1654
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1685
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1687
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1714
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
1736
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
1754
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2007
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2011
var pyprojectPath = Path.Combine(workspace.
Path
, "pyproject.toml");
2014
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2041
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2045
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2048
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2076
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2080
var pyprojectPath = Path.Combine(workspace.
Path
, "pyproject.toml");
2082
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2085
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2106
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2109
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2130
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2134
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2153
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2157
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2161
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2181
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2185
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2189
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2210
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2213
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2238
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2242
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2245
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2281
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2284
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2287
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2311
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2314
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2317
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2345
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2348
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2352
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2381
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2384
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2388
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2411
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2414
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2418
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2443
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2446
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2450
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2475
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2478
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2481
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2511
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2514
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2546
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2565
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2568
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2571
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
Aspire.Hosting.Tests (52)
Dashboard\DashboardEventHandlersTests.cs (1)
361
["Aspire:Store:Path"] = workspace.
Path
,
PublishAsDockerfileTests.cs (1)
513
File.WriteAllText(Path.Join(workspace.
Path
, "Dockerfile"), "this does not matter");
Publishing\ContainerImageArchiveRewriterTests.cs (22)
20
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
21
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
105
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
106
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
181
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
182
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
217
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
218
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
290
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
291
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
311
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
312
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
333
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
334
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
357
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
358
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
390
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
391
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
412
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
413
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
436
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
437
var compressedArchive = Path.Combine(workspace.
Path
, "custom-extension.archive");
Utils\DotnetSdkVersionProviderTests.cs (27)
75
workspace.
Path
,
81
Assert.Equal(workspace.
Path
, processSpec.WorkingDirectory);
98
workspace.
Path
,
120
workspace.
Path
,
145
workspace.
Path
,
170
workspace.
Path
,
195
workspace.
Path
,
231
workspace.
Path
,
235
workspace.
Path
,
239
workspace.
Path
,
267
workspace.
Path
,
271
workspace.
Path
,
287
File.WriteAllText(Path.Combine(workspace.
Path
, "global.json"), "{}");
288
var firstDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "src", "First")).FullName;
289
var secondDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "src", "Second")).FullName;
309
var firstDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "First")).FullName;
310
var secondDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "Second")).FullName;
334
var globalJsonPath = Path.Combine(workspace.
Path
, "global.json");
342
workspace.
Path
,
346
workspace.
Path
,
364
workspace.
Path
,
367
workspace.
Path
,
384
workspace.
Path
,
402
workspace.
Path
,
406
workspace.
Path
,
417
workspace.
Path
,
436
workspace.
Path
,
WithVolumeTests.cs (1)
171
builder.Configuration[AspireStore.AspireStorePathKeyName] = workspace.
Path
;
Aspire.Hosting.TestUtilities (1)
tests\Shared\TemporaryWorkspace.cs (1)
218
var aspireDir = IOPath.Combine(workspace.
Path
, ".aspire");
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (6)
171
var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.
Path
);
186
var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.
Path
);
200
var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.
Path
);
212
var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.
Path
);
216
Assert.Contains(workspace.
Path
, annotation.ContextPath);
225
var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.
Path
);
YarpConfigGeneratorTests.cs (2)
267
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
292
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");