2139 references to Path
Aspire.Hosting.Azure.EntraId.Tests (42)
EntraIdApiProvisioningTests.cs (5)
766
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
782
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
786
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
787
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-api", "entra-api.bicep")), "bicep")
788
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
EntraIdAppRoleAssignmentTests.cs (5)
216
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
249
workspace.
Path
, app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value,
253
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
255
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-api", "entra-api.bicep")), "bicep")
256
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "worker", "worker.bicep")), "bicep");
EntraIdProvisioningTests.cs (29)
798
using var first = entra.Resource.GetBicepTemplateFile(workspace.
Path
);
800
using var second = entra.Resource.GetBicepTemplateFile(workspace.
Path
);
863
var manifest = await ManifestUtils.GetManifest(entra.Resource, workspace.
Path
);
873
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
886
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
890
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
891
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
898
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
909
workspace.
Path
,
917
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
918
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
925
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
934
workspace.
Path
,
945
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep");
952
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
967
workspace.
Path
,
975
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
976
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
983
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
998
workspace.
Path
,
1006
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "web", "web.bicep")), "bicep");
1013
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
1039
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
1043
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
1044
var apiBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-api", "entra-api.bicep"));
1045
var webBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep"));
1046
var consumerBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "consumer", "consumer.bicep"));
1047
Assert.Equal(new[] { "consumer", "entra-api", "entra-web" }, Directory.GetDirectories(workspace.
Path
).Select(Path.GetFileName).Order());
1665
DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: WellKnownPipelineSteps.Deploy);
EntraIdStarterScenarioPublishTests.cs (3)
27
var apiProject = CreateProject(workspace.
Path
, "aspire-entra.ApiService", 5101, 7101);
28
var webProject = CreateProject(workspace.
Path
, "aspire-entra.Web", 5102, 7102);
29
var outputPath = Path.Combine(workspace.
Path
, "out");
Aspire.Hosting.Azure.Kubernetes.Tests (36)
AzureKubernetesEnvironmentExtensionsTests.cs (30)
608
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
609
var clusterBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
610
var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "cluster-roles", "cluster-roles.bicep"));
818
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
819
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
820
var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, roles.Name, $"{roles.Name}.bicep"));
821
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "registry", "registry.bicep"));
822
var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity", "aks-control-plane-identity.bicep"));
823
var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-kubelet-identity", "aks-kubelet-identity.bicep"));
824
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"));
1033
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
1034
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
1035
var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, roles.Name, $"{roles.Name}.bicep"));
1036
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "registry", "registry.bicep"));
1131
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
1132
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
1133
var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, operatorRole.Name, $"{operatorRole.Name}.bicep"));
1134
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-acr", "aks-acr.bicep"));
1135
var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity", "aks-control-plane-identity.bicep"));
1136
var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-kubelet-identity", "aks-kubelet-identity.bicep"));
1137
var registryRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, registryRole.Name, $"{registryRole.Name}.bicep"));
1221
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
1222
var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "registry", "registry.bicep"));
1223
var registryRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, registryRole.Name, $"{registryRole.Name}.bicep"));
1224
var networkBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "network", "network.bicep"));
1225
var networkRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, networkRole.Name, $"{networkRole.Name}.bicep"));
1226
var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks", "aks.bicep"));
1227
var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-control-plane-identity", "aks-control-plane-identity.bicep"));
1228
var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "aks-kubelet-identity", "aks-kubelet-identity.bicep"));
1230
var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, operatorRoleName, $"{operatorRoleName}.bicep"));
AzureKubernetesFoundryReferenceTests.cs (1)
77
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 (104)
AzureApiManagementTests.cs (10)
387
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
423
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
881
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
915
var documentPath = Path.Combine(workspace.
Path
, "deploy-only.json");
939
var documentPath = Path.Combine(workspace.
Path
, "deploy-only.json");
966
var documentPath = Path.Combine(workspace.
Path
, "generated.json");
992
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
1086
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
2083
workspace.
Path
);
2096
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
AzureAppServiceTests.cs (10)
239
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "validate-appservice-config-env");
280
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "validate-appservice-config-env");
312
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "validate-appservice-config-env");
615
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
631
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
635
var envBicepPath = Path.Combine(workspace.
Path
, "env", "env.bicep");
639
var apiBicepPath = Path.Combine(workspace.
Path
, "api", "api.bicep");
811
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "publish-manifest");
832
Path.Combine(workspace.
Path
, "aspire-manifest.json"),
841
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 (5)
552
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
565
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
569
var envBicepPath = Path.Combine(workspace.
Path
, "env", "env.bicep");
586
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
606
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "main.bicep")));
AzureContainerAppExpressEndpointTests.cs (2)
232
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
267
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "main.bicep")));
AzureContainerAppsTests.cs (11)
2020
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "publish-manifest");
2038
await VerifyFile(Path.Combine(workspace.
Path
, "aspire-manifest.json"));
2142
workspace.
Path
,
2172
workspace.
Path
,
2292
workspace.
Path
,
2318
workspace.
Path
,
2347
workspace.
Path
,
2376
workspace.
Path
,
2836
File.WriteAllText(Path.Combine(workspace.
Path
, "Dockerfile"), "FROM alpine");
2838
builder.AddDockerfile("with-bind-mount", workspace.
Path
)
2839
.WithBindMount(workspace.
Path
, "/app/data");
AzureEnvironmentResourceTests.cs (24)
56
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
93
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
305
workspace.
Path
);
320
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
328
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
365
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
374
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
381
var outputPath = Path.Combine(workspace.
Path
, "exclude-main");
403
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
408
var context = await CreatePublishingContextAsync(app, workspace.
Path
);
419
Assert.True(File.Exists(Path.Combine(workspace.
Path
, resourceName, $"{resourceName}.bicep")));
420
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
428
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
435
var outputPath = Path.Combine(workspace.
Path
, "write-main");
460
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
474
var outputPath = Path.Combine(workspace.
Path
, "provider");
523
output, workspace.
Path
);
537
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
542
var includedStorageBicepPath = Path.Combine(workspace.
Path
, "included-storage", "included-storage.bicep");
546
var excludedStorageBicepPath = Path.Combine(workspace.
Path
, "excluded-storage", "excluded-storage.bicep");
556
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
568
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
581
remoteInvokeOptions.StartInfo.WorkingDirectory = workspace.
Path
;
582
using var handle = RemoteExecutor.Invoke(RunTest, workspace.
Path
, remoteInvokeOptions);
AzureFrontDoorAppServicePrivateLinkTests.cs (4)
20
DistributedApplicationOperation.Publish, testOutputHelper, workspace.
Path
);
30
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep");
31
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "api", "api.bicep")));
32
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "frontdoor", "frontdoor.bicep")));
AzureFunctionsTests.cs (30)
308
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
331
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
356
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript)
380
builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
406
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript)
433
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.JavaScript)
459
builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
471
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
472
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock);
476
var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
505
var dockerfilePath = Path.Combine(tempDir.
Path
, "funcapp.Dockerfile");
525
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
526
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock);
530
await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
544
var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.
Path
, "funcapp.Dockerfile"));
557
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
558
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock: true);
563
var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
567
Assert.False(File.Exists(Path.Combine(tempDir.
Path
, "funcapp.Dockerfile")));
577
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
582
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock: true);
601
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
615
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.JavaScript);
966
var projectPath = Path.Combine(workspace.
Path
, "TestFunctions.csproj");
991
var projectPath = Path.Combine(workspace.
Path
, "MyFunctions.csproj");
1013
var projectPath = Path.Combine(workspace.
Path
, "TestFunctions.csproj");
1043
var projectPath1 = Path.Combine(workspace.
Path
, "Functions1.csproj");
1044
var projectPath2 = Path.Combine(workspace.
Path
, "Functions2.csproj");
1065
var projectPath = Path.Combine(workspace.
Path
, "Functions.csproj");
1095
var projectPath = Path.Combine(workspace.
Path
, "Functions.csproj");
AzureSandboxesTests.cs (2)
211
workspace.
Path
);
218
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
JavaScriptPublishValidationTests.cs (2)
33
builder.AddJavaScriptApp("js", workspace.
Path
)
37
builder.AddNextJsApp("nextjs", workspace.
Path
).WithExternalHttpEndpoints();
Aspire.Hosting.Docker.Tests (145)
DockerComposePublisherTests.cs (104)
31
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-env");
63
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production")), "env")
73
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
92
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "docker-compose.yaml")), "yaml").UseParameters(longNames);
105
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
128
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
148
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-env");
170
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production")), "env").UseParameters(overridden);
177
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-env");
199
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "docker-compose.yaml")), "yaml")
200
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env")), "env")
201
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production")), "env");
210
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
285
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
286
var envPath = Path.Combine(workspace.
Path
, ".env");
298
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
308
var compose = File.ReadAllText(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
324
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
346
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
347
var envPath = Path.Combine(workspace.
Path
, ".env");
359
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
369
var compose = File.ReadAllText(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
370
var environment = File.ReadAllText(Path.Combine(workspace.
Path
, ".env"));
379
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
)
394
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
404
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "publish-docker-compose")
423
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
432
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
474
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
476
var envPath = Path.Combine(workspace.
Path
, ".env");
487
var envFilePath = Path.Combine(workspace.
Path
, ".env");
491
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
518
var envFilePath = Path.Combine(workspace.
Path
, ".env");
522
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
559
var envFilePath = Path.Combine(workspace.
Path
, ".env");
562
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
578
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
592
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
604
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
618
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
633
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
650
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
665
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
681
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
696
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
709
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
722
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
743
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
754
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
767
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
782
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
795
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
811
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
825
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
839
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
854
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
867
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
886
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
898
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
911
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
923
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, workspace.
Path
);
935
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
944
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
962
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
972
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
991
var envFilePath = Path.Combine(workspace.
Path
, ".env.Staging");
1004
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1025
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1035
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1047
var envFilePath = Path.Combine(workspace.
Path
, ".env.Production");
1068
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1081
var envFilePath = Path.Combine(workspace.
Path
, ".env.Staging");
1098
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1114
var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
1115
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1125
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1147
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1156
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1173
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1184
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1198
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1199
var envPath = Path.Combine(workspace.
Path
, ".env");
1212
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1225
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1241
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1256
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1257
var envPath = Path.Combine(workspace.
Path
, ".env");
1269
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1284
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1295
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1320
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1321
var envPath = Path.Combine(workspace.
Path
, ".env");
1334
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1368
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1369
var envPath = Path.Combine(workspace.
Path
, ".env");
1388
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1402
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1403
var envPath = Path.Combine(workspace.
Path
, ".env");
1415
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1446
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1456
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1480
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1490
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1508
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
DockerComposeTests.cs (25)
52
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
64
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
72
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
86
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
153
var outputPath = Path.Combine(workspace.
Path
, "output");
180
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
192
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
204
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
226
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
240
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
265
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
325
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: step);
352
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
379
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
428
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: step);
694
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "push-servicea");
725
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "push-servicea");
762
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
810
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
970
["OutputPath"] = workspace.
Path
,
972
["ComposeFilePath"] = Path.Combine(workspace.
Path
, "docker-compose.yaml")
976
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
1013
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
1045
var deployBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Deploy);
1069
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 (348)
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 (270)
46
options => options.ProjectDirectory = workspace.
Path
,
108
options => options.ProjectDirectory = workspace.
Path
,
111
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
139
var globalJsonPath = Path.Combine(workspace.
Path
, "global.json");
144
options => options.ProjectDirectory = workspace.
Path
,
153
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
200
options => options.ProjectDirectory = workspace.
Path
,
210
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
211
var firstDotnetPath = Path.Combine(workspace.
Path
, "first-sdk");
212
var secondDotnetPath = Path.Combine(workspace.
Path
, "second-sdk");
268
options => options.ProjectDirectory = workspace.
Path
,
272
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
290
var sharedProject = CreateSharedProject(workspace.
Path
);
291
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
293
options => options.ProjectDirectory = workspace.
Path
,
347
options => options.ProjectDirectory = workspace.
Path
,
359
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
381
options => options.ProjectDirectory = workspace.
Path
,
390
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
414
options => options.ProjectDirectory = workspace.
Path
,
426
var sharedProject = CreateSharedProject(workspace.
Path
);
427
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
428
var filePath = CreateFileApp(workspace.
Path
, "Worker", sharedProject);
470
options => options.ProjectDirectory = workspace.
Path
,
479
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
500
options => options.ProjectDirectory = workspace.
Path
,
509
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
532
options => options.ProjectDirectory = workspace.
Path
,
537
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
554
options => options.ProjectDirectory = workspace.
Path
,
563
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
581
options => options.ProjectDirectory = workspace.
Path
,
583
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
625
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
677
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
762
options => options.ProjectDirectory = workspace.
Path
,
765
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
772
Path.Combine(workspace.
Path
, "artifacts");
794
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
821
options => options.ProjectDirectory = workspace.
Path
,
824
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
825
var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "worker"));
910
options => options.ProjectDirectory = workspace.
Path
,
912
var sharedProject = CreateSharedProject(workspace.
Path
);
913
var firstPath = CreateFileApp(workspace.
Path
, "First", sharedProject);
914
var secondPath = CreateFileApp(workspace.
Path
, "Second", sharedProject);
915
var firstSentinel = Path.Combine(workspace.
Path
, "first-ran.txt");
916
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
985
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1072
options => options.ProjectDirectory = workspace.
Path
,
1074
var firstProject = CreateProject(workspace.
Path
, "First's Project", "First.csproj");
1075
var secondProject = CreateProject(workspace.
Path
, "Second", "Second.csproj");
1104
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1105
var customTargetsPath = Path.Combine(workspace.
Path
, "CustomNuGet.targets");
1115
workspace.
Path
,
1116
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1120
workspace.
Path
,
1128
WorkingDirectory = workspace.
Path
,
1159
var projectPath = CreateProjectFile(workspace.
Path
, "Service", """
1168
workspace.
Path
,
1169
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1173
workspace.
Path
,
1179
var missingTargetsPath = Path.Combine(workspace.
Path
, "missing", "NuGet.targets");
1182
WorkingDirectory = workspace.
Path
,
1215
using var builder = TestDistributedApplicationBuilder.Create(options => options.ProjectDirectory = workspace.
Path
, outputHelper);
1216
var aspireStoreRoot = Path.Combine(workspace.
Path
, "custom-obj");
1218
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1234
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1235
var buildDirectory = Path.Combine(workspace.
Path
, "obj", ".aspire", "build");
1236
using var unified = new DotnetProjectBuildResource("unified", workspace.
Path
, buildDirectory, TimeProvider.System);
1237
using var individual = new DotnetProjectBuildResource("individual", workspace.
Path
, buildDirectory, TimeProvider.System);
1238
unified.ConfigureTraversalBuild([projectPath], workspace.
Path
, buildConfiguration: null, restoreProjectsIndividually: false);
1239
individual.ConfigureTraversalBuild([projectPath], workspace.
Path
, buildConfiguration: null, restoreProjectsIndividually: true);
1257
options => options.ProjectDirectory = workspace.
Path
,
1259
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1356
workspace.
Path
,
1357
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1361
workspace.
Path
,
1408
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1443
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1502
options => options.ProjectDirectory = workspace.
Path
,
1504
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1505
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1525
options => options.ProjectDirectory = workspace.
Path
,
1527
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1528
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1548
options => options.ProjectDirectory = workspace.
Path
,
1550
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1551
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1577
options => options.ProjectDirectory = workspace.
Path
,
1579
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1580
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1599
options => options.ProjectDirectory = workspace.
Path
,
1601
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1602
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1625
options => options.ProjectDirectory = workspace.
Path
,
1643
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1663
options => options.ProjectDirectory = workspace.
Path
,
1665
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1692
options => options.ProjectDirectory = workspace.
Path
,
1695
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1696
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1751
options => options.ProjectDirectory = workspace.
Path
,
1753
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1787
options => options.ProjectDirectory = workspace.
Path
,
1789
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1826
options => options.ProjectDirectory = workspace.
Path
,
1829
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1877
options => options.ProjectDirectory = workspace.
Path
,
1880
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1947
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1995
options => options.ProjectDirectory = workspace.
Path
,
1997
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2041
options => options.ProjectDirectory = workspace.
Path
,
2044
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2097
options => options.ProjectDirectory = workspace.
Path
,
2100
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2155
options => options.ProjectDirectory = workspace.
Path
,
2158
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2216
var projectPath = CreateBrokenProject(workspace.
Path
, "COORDINATED_BUILD_MARKER");
2223
options.ProjectDirectory = workspace.
Path
;
2266
options => options.ProjectDirectory = workspace.
Path
,
2268
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2318
options => options.ProjectDirectory = workspace.
Path
,
2320
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2352
options => options.ProjectDirectory = workspace.
Path
,
2354
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2392
options => options.ProjectDirectory = workspace.
Path
,
2394
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2463
options => options.ProjectDirectory = workspace.
Path
,
2465
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
2466
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2493
options => options.ProjectDirectory = workspace.
Path
,
2495
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2516
options => options.ProjectDirectory = workspace.
Path
,
2518
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2538
options => options.ProjectDirectory = workspace.
Path
,
2540
var appPath = Path.Combine(workspace.
Path
, "app.cs");
2558
options => options.ProjectDirectory = workspace.
Path
,
2560
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2599
options => options.ProjectDirectory = workspace.
Path
,
2601
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2729
options => options.ProjectDirectory = workspace.
Path
,
2731
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2810
options => options.ProjectDirectory = workspace.
Path
,
2812
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2861
options => options.ProjectDirectory = workspace.
Path
,
2863
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2931
options => options.ProjectDirectory = workspace.
Path
,
2933
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2960
options => options.ProjectDirectory = workspace.
Path
,
2962
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
2963
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
3001
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
3057
options => options.ProjectDirectory = workspace.
Path
,
3059
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
3061
var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime-1")).FullName;
3062
var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime-2")).FullName;
3107
options => options.ProjectDirectory = workspace.
Path
,
3109
var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "source")).FullName;
3113
var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime")).FullName;
3132
options => options.ProjectDirectory = workspace.
Path
,
3135
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "source")).FullName,
3139
var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "foreign")).FullName;
3167
options => options.ProjectDirectory = workspace.
Path
,
3169
var activePath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
3170
var removedPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
3191
options => options.ProjectDirectory = workspace.
Path
,
3193
var activePath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
3194
var replacedPath = CreateProject(workspace.
Path
, "Replaced", "Replaced.csproj");
3201
@event.Model.Resources[index] = new ExecutableResource(replaced.Resource.Name, "dotnet", workspace.
Path
);
3217
options => options.ProjectDirectory = workspace.
Path
,
3219
var projectPath = CreateProject(workspace.
Path
, "Project", "Project.csproj");
3220
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
3267
options => options.ProjectDirectory = workspace.
Path
,
3269
var firstPath = CreateProject(workspace.
Path
, "First", "First.csproj");
3270
var secondPath = CreateProject(workspace.
Path
, "Second", "Second.csproj");
3314
options => options.ProjectDirectory = workspace.
Path
,
3316
var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "Physical"));
3326
var linkPath = Path.Combine(workspace.
Path
, "Alias");
3337
var otherProjectPath = CreateProject(workspace.
Path
, "Other", "Other.csproj");
3364
options => options.ProjectDirectory = workspace.
Path
,
3366
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3388
options => options.ProjectDirectory = workspace.
Path
,
3390
var removedProjectPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
3397
var activeProjectPath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
3418
options => options.ProjectDirectory = workspace.
Path
,
3420
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3448
options => options.ProjectDirectory = workspace.
Path
,
3450
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3481
options => options.ProjectDirectory = workspace.
Path
,
3483
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3514
options => options.ProjectDirectory = workspace.
Path
,
3516
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3539
options => options.ProjectDirectory = workspace.
Path
,
3541
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3542
var removedPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
3543
var missingPath = Path.Combine(workspace.
Path
, "Missing", "Missing.csproj");
3566
options => options.ProjectDirectory = workspace.
Path
,
3568
var firstPath = CreateProject(workspace.
Path
, "First", "First.csproj");
3569
var secondPath = CreateProject(workspace.
Path
, "Second", "Second.csproj");
3625
options => options.ProjectDirectory = workspace.
Path
,
3627
var projectPath = CreateProject(workspace.
Path
, "Service", "App.csproj");
3628
var linkDirectory = Path.Combine(workspace.
Path
, "ServiceAlias");
3667
workspace.
Path
,
3668
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
3670
buildResource.AddProject(CreateProject(workspace.
Path
, "Api", "Api.csproj"));
3717
var sharedProject = CreateSharedProject(workspace.
Path
);
3718
var apiProject = CreateConsoleProject(workspace.
Path
, "Api", sharedProject, extension);
3719
var workerProject = CreateConsoleProject(workspace.
Path
, "Worker", sharedProject, workerExtension);
3720
var escapedDirectory = Path.Combine(workspace.
Path
, "Api's Project 100% (test)");
3723
var apiSentinel = Path.Combine(workspace.
Path
, "api-ran.txt");
3724
var workerSentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
3727
options => options.ProjectDirectory = workspace.
Path
,
3778
var sharedProject = CreateSharedProject(workspace.
Path
);
3779
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
3787
var sentinels = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "instances")).FullName;
3789
options => options.ProjectDirectory = workspace.
Path
,
3844
var projectPath = CreateBrokenProject(workspace.
Path
, "REPLICAS_BUILD_FAILED");
3846
options => options.ProjectDirectory = workspace.
Path
,
3878
var firstProject = CreateSentinelProject(workspace.
Path
, "First", """
3883
var secondProject = CreateSentinelProject(workspace.
Path
, "Second", """
3889
var firstSentinel = Path.Combine(workspace.
Path
, "first-ran.txt");
3890
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
3893
options => options.ProjectDirectory = workspace.
Path
,
3933
var brokenProject = CreateBrokenProject(workspace.
Path
, "FIRST_BUILD_FAILED");
3934
var secondBuildMarker = Path.Combine(workspace.
Path
, "second-built.txt");
3935
var secondProject = CreateSentinelProject(workspace.
Path
, "Second", $$"""
3940
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
3943
options => options.ProjectDirectory = workspace.
Path
,
3988
var validProject = CreateProjectFile(workspace.
Path
, "Valid", """
3999
var sentinelPath = Path.Combine(workspace.
Path
, "valid-ran.txt");
4000
var missingProject = Path.Combine(workspace.
Path
, "Missing", "Missing.csproj");
4003
options => options.ProjectDirectory = workspace.
Path
,
4045
options => options.ProjectDirectory = workspace.
Path
,
4053
var missingPath = Path.Combine(workspace.
Path
, "Missing", $"Missing.{extension}");
4081
var projectPath = CreateProjectFile(workspace.
Path
, "EnvironmentBuild", $$"""
4107
var sentinelPath = Path.Combine(workspace.
Path
, "environment-build-ran.txt");
4112
options => options.ProjectDirectory = workspace.
Path
,
4203
var projectPath = CreateProjectWithBuildProducedRunPropertiesSentinel(workspace.
Path
);
4206
options => options.ProjectDirectory = workspace.
Path
,
4264
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4265
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
4268
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4297
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4299
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4369
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4371
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4413
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4415
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4448
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4450
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4497
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4498
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
4501
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4531
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4532
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
4535
options => options.ProjectDirectory = workspace.
Path
,
4594
var projectPath = CreateProject(workspace.
Path
, "EnvironmentBuild", "EnvironmentBuild.csproj");
4597
options => options.ProjectDirectory = workspace.
Path
,
4603
Path.Combine(workspace.
Path
, "missing-dotnet");
4638
var brokenProject = CreateBrokenProject(workspace.
Path
, buildLogMarker);
4639
var fileApp = Path.Combine(workspace.
Path
, "worker.cs");
4640
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
4650
options => options.ProjectDirectory = workspace.
Path
,
4701
var releaseBuild = Path.Combine(workspace.
Path
, "release-build");
4702
var brokenProject = CreateGatedBrokenProject(workspace.
Path
, releaseBuild);
4703
var fileApp = Path.Combine(workspace.
Path
, "worker.cs");
4704
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
4714
options => options.ProjectDirectory = workspace.
Path
,
DotnetProjectFacadeTests.cs (1)
160
var path = Path.Combine(workspace.
Path
, "Service.vbproj");
DotnetProjectLaunchProfileTests.cs (9)
27
var path = CreateProject(workspace.
Path
, ".VBPROJ");
78
var path = CreateProject(workspace.
Path
, ".vbproj");
115
var path = CreateProject(workspace.
Path
, ".vbproj");
150
var path = CreateProject(workspace.
Path
, ".vbproj");
167
var path = CreateProject(workspace.
Path
, ".vbproj");
199
var path = CreateProject(workspace.
Path
, extension);
225
var path = CreateProject(workspace.
Path
, extension);
247
var path = CreateProject(workspace.
Path
, ".vbproj");
264
var path = CreateProject(workspace.
Path
, ".vbproj");
DotnetProjectOptionsTests.cs (3)
26
var projectPath = await CreateProjectAsync(workspace.
Path
, includeKestrel: false);
50
var projectPath = await CreateProjectAsync(workspace.
Path
, includeKestrel: false);
76
var projectPath = await CreateProjectAsync(workspace.
Path
, includeKestrel: true);
DotnetProjectPathTests.cs (19)
24
var projectPath = Path.Combine(workspace.
Path
, $"Service{extension}");
27
options => options.ProjectDirectory = workspace.
Path
,
39
Assert.Equal(workspace.
Path
, resource.Resource.WorkingDirectory);
63
options => options.ProjectDirectory = workspace.
Path
,
89
var path = Path.Combine(workspace.
Path
, "Service.fsproj");
95
options => options.ProjectDirectory = workspace.
Path
,
101
includeProject ? path : workspace.
Path
,
127
options => options.ProjectDirectory = workspace.
Path
,
158
var path = Path.Combine(workspace.
Path
, fileName);
164
options => options.ProjectDirectory = workspace.
Path
,
196
options => options.ProjectDirectory = workspace.
Path
,
216
var path = Path.Combine(workspace.
Path
, $"Service{extension}");
221
var legacy = builder.AddProject("legacy", workspace.
Path
, options => options.ExcludeLaunchProfile = true);
223
var modern = builder.AddDotnetProject("modern", workspace.
Path
, options => options.ExcludeLaunchProfile = true);
225
Assert.Equal(workspace.
Path
, legacy.Resource.GetProjectMetadata().ProjectPath);
237
var path = Path.Combine(workspace.
Path
, $"Service{extension}");
287
var path = Path.Combine(workspace.
Path
, fileName);
308
var path = Path.Combine(workspace.
Path
, "MissingDirectory");
327
var path = Path.Combine(workspace.
Path
, $"Missing{extension}");
DotnetProjectResourceTests.cs (33)
163
"project" => CreateFile(workspace.
Path
, "MyService.csproj"),
164
"fsharp-project" => CreateFile(workspace.
Path
, "MyService.fsproj"),
165
"visualbasic-project" => CreateFile(workspace.
Path
, "MyService.vbproj"),
166
"directory" => CreateProjectDirectory(workspace.
Path
),
167
"file" => CreateFile(workspace.
Path
, "service.cs"),
174
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
176
var expectedPath = Path.GetRelativePath(workspace.
Path
, metadata.ProjectPath).Replace('\\', '/');
190
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
207
var resource = new DotnetProjectResource("svc", workspace.
Path
);
209
() => ManifestUtils.GetManifest(resource, workspace.
Path
));
221
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
229
var manifest = await ManifestUtils.GetManifestOrNull(resource.Resource, workspace.
Path
);
237
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
245
var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.
Path
);
253
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
254
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "Dockerfile"), "FROM scratch");
263
var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.
Path
);
293
var appPath = Path.Combine(workspace.
Path
, "app.cs");
300
var archivePath = Path.Combine(workspace.
Path
, "app.tar.gz");
330
var sentinelDockerfilePath = Path.Combine(workspace.
Path
, "Dockerfile.sentinel");
331
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "sentinel.txt"), marker, cancellation.Token);
334
workspace.
Path
,
399
var projectPath = Path.Combine(workspace.
Path
, "Project.csproj");
406
context.OutputPath = Path.Combine(workspace.
Path
, "project.tar");
425
var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "project"));
427
var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime"));
451
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
469
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "AmbiguousService"));
538
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
672
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
742
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
1125
var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "project"));
1152
var archivePath = Path.Combine(workspace.
Path
, "project.tar.gz");
DotnetProjectRunPropertiesResolverTests.cs (6)
20
var projectPath = Path.Combine(workspace.
Path
, "Broken.csproj");
39
workspace.
Path
,
55
var projectPath = Path.Combine(workspace.
Path
, "Warning.csproj");
75
workspace.
Path
,
83
Path.Combine(workspace.
Path
, "bin"),
84
Path.Combine(workspace.
Path
, "bin", "app.dll"),
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFOutputDiffingTests.cs (4)
26
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "inspect");
76
var artifact = Path.Combine(workspace.
Path
, "efmigrations", bundle ? "migrations" : "migrations.sql");
79
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
118
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
Aspire.Hosting.Go.Tests (24)
AddGoAppTests.cs (8)
1015
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1020
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1075
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1079
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1088
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1093
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1102
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1107
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
GoRunDebuggingTests.cs (5)
354
File.WriteAllText(Path.Combine(workspace.
Path
, "go.mod"), "module example.com/debugflags\n\ngo 1.18\n");
355
File.WriteAllText(Path.Combine(workspace.
Path
, "main.go"), """
421
File.WriteAllText(Path.Combine(workspace.
Path
, "tag.go"), """
431
var go = builder.AddGoApp("api", workspace.
Path
)
436
var goEnvironment = Path.Combine(workspace.
Path
, "go.env");
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 (489)
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 (83)
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
);
274
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
296
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
321
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
341
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
343
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
347
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
356
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
358
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
365
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
375
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
377
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
384
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
393
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
395
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
400
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
411
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
413
var appDir = Path.Combine(workspace.
Path
, "js");
422
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
424
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
442
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
444
var appDir = Path.Combine(workspace.
Path
, "js");
458
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
460
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
476
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
478
var appDir = Path.Combine(workspace.
Path
, "js");
493
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
495
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
508
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
510
var appDir = Path.Combine(workspace.
Path
, "js");
524
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
526
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
537
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
539
var appDir = Path.Combine(workspace.
Path
, "js");
553
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
555
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
576
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
578
var appDir = Path.Combine(workspace.
Path
, "js");
602
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
605
var appDir = Path.Combine(workspace.
Path
, "pnpm-app");
625
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
627
var dockerfilePath = Path.Combine(workspace.
Path
, "pnpm-app.Dockerfile");
698
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
700
var appDir = Path.Combine(workspace.
Path
, "pnpm-app");
721
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
723
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
);
1049
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
1072
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
1093
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 (296)
KubernetesDeployTests.cs (60)
308
workspace.
Path
,
349
workspace.
Path
,
389
workspace.
Path
,
430
workspace.
Path
,
470
workspace.
Path
,
505
workspace.
Path
,
541
workspace.
Path
,
565
workspace.
Path
,
590
workspace.
Path
,
797
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
831
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
845
var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "Chart.yaml"));
858
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
876
var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "Chart.yaml"));
889
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
898
var deploymentYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "svc", "deployment.yaml"));
912
workspace.
Path
,
939
var outputPath = Path.Combine(workspace.
Path
, "env");
986
var outputPath = Path.Combine(workspace.
Path
, "env");
1006
var outputPath = Path.Combine(workspace.
Path
, "env");
1080
var outputPath = Path.Combine(workspace.
Path
, "env");
1131
workspace.
Path
,
1164
workspace.
Path
,
1237
var outputPath = Path.Combine(workspace.
Path
, "env");
1287
var outputPath = Path.Combine(workspace.
Path
, "env");
1310
workspace.
Path
,
1336
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1359
var serverSecretsTemplatePath = Path.Combine(workspace.
Path
, "templates", "server", "secrets.yaml");
1381
workspace.
Path
,
1411
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1438
var outputPath = Path.Combine(workspace.
Path
, "deploy");
1500
workspace.
Path
,
1526
workspace.
Path
, env, CancellationToken.None);
1528
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1554
workspace.
Path
,
1587
workspace.
Path
, env, CancellationToken.None);
1589
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1600
workspace.
Path
,
1632
workspace.
Path
, env, CancellationToken.None);
1634
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1645
workspace.
Path
,
1672
workspace.
Path
, env, CancellationToken.None);
1674
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1675
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1677
await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "myapp", "config.yaml")),
1737
workspace.
Path
,
1752
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1774
workspace.
Path
,
1793
var configPath = Path.Combine(workspace.
Path
, "templates", resourceName, "config.yaml");
1811
workspace.
Path
,
1828
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1846
workspace.
Path
,
1863
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1882
workspace.
Path
,
1899
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1940
workspace.
Path
,
1971
workspace.
Path
,
2011
workspace.
Path
,
2056
workspace.
Path
,
2104
workspace.
Path
,
KubernetesEnvironmentResourceTests.cs (5)
20
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
30
var chartYaml = Path.Combine(workspace.
Path
, "Chart.yaml");
31
var valuesYaml = Path.Combine(workspace.
Path
, "values.yaml");
32
var deploymentYaml = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
96
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 (150)
33
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
55
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
80
await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.
Path
, environment.Resource, TestContext.Current.CancellationToken);
83
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
89
var exitCode = await new DefaultHelmRunner().RunAsync(arguments, workspace.
Path
,
118
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
156
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
191
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
215
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
226
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
259
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml").UseParameters(gateway, tls);
270
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
310
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
323
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
340
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
371
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
388
await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.
Path
, environment.Resource, cts.Token);
390
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates/backend/config.yaml")), "yaml")
391
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
392
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml");
402
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
437
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml")), "yaml")
445
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
494
var filePath = Path.Combine(workspace.
Path
, expectedFile);
514
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
533
var deploymentPath = Path.Combine(workspace.
Path
, "templates/service/deployment.yaml");
545
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
591
var filePath = Path.Combine(workspace.
Path
, expectedFile);
611
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
635
var manifestPath = Path.Combine(workspace.
Path
, "templates/myapp/scaler.yaml");
666
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
683
var templatesFolder = Path.Combine(workspace.
Path
, "templates", "myapp");
739
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
780
var filePath = Path.Combine(workspace.
Path
, expectedFile);
800
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
834
var filePath = Path.Combine(workspace.
Path
, expectedFile);
854
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
866
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
877
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
941
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
951
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
990
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1000
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1025
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1035
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1118
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1178
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1214
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1237
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1268
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1269
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "api", "deployment.yaml")), "yaml")
1277
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1288
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
1299
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1315
var publishedValues = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml"));
1316
await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.
Path
, environment.Resource, CancellationToken.None);
1319
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml")
1327
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1337
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
1346
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1360
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1370
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1384
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1392
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1404
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1405
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "worker", "deployment.yaml")), "yaml")
1406
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "cache", "deployment.yaml")), "yaml");
1413
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1421
await Verify(File.ReadAllText(Path.Combine(workspace.
Path
, "Chart.yaml")), "yaml")
1422
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1423
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "deployment.yaml")), "yaml")
1424
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "service.yaml")), "yaml")
1425
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "config.yaml")), "yaml");
1432
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1458
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1476
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1502
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1520
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1528
var servicePath = Path.Combine(workspace.
Path
, "templates/database/service.yaml");
1541
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1564
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1591
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1616
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1639
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1659
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1677
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1704
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1724
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1750
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1776
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1800
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1836
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1859
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1879
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1905
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1925
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1966
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1986
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2017
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2037
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2079
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2099
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2115
var valuesContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml"));
2125
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2164
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2184
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2218
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2248
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2275
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2294
var legacyPv = Path.Combine(workspace.
Path
, "templates", "service", "data-pv.yaml");
2309
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2324
var deploymentPath = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
2342
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2369
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2382
var legacyPvc = Path.Combine(workspace.
Path
, "templates", "service", "data-pvc.yaml");
2386
var deploymentPath = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
2399
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2424
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2442
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2464
var claimPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2474
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2491
var omittedClaimPath = Path.Combine(workspace.
Path
, "templates", "omitted", "omitted.yaml");
2492
var emptyClaimPath = Path.Combine(workspace.
Path
, "templates", "empty", "empty.yaml");
2507
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2533
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", name, $"{name}.yaml"));
2546
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2571
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", name, $"{name}.yaml"));
2584
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2607
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "data", "data.yaml"));
2615
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2633
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
2643
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2660
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
2680
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2711
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2729
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2750
Assert.Equal("default-class", ReadStorageClassName(workspace.
Path
, "default"));
2751
Assert.Equal("explicit-class", ReadStorageClassName(workspace.
Path
, "explicit"));
2752
Assert.Null(ReadStorageClassName(workspace.
Path
, "omitted"));
2759
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2791
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2813
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2829
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "service", "statefulset.yaml");
2835
var pvcPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2853
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2884
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2899
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
2946
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2973
var pvcPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2985
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
Aspire.Hosting.Maui.Tests (65)
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 (4)
26
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
53
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
80
var tempFile = Path.Combine(workspace.
Path
, "TempMauiProject.csproj");
107
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 (3)
AddMySqlTests.cs (2)
278
builder.Configuration["Aspire:Store:Path"] = workspace.
Path
;
313
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 (123)
AddPythonAppTests.cs (123)
431
builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py"));
444
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
453
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
477
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
517
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
536
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
591
options.ProjectDirectory = workspace.
Path
;
637
options.ProjectDirectory = workspace.
Path
;
711
options.ProjectDirectory = workspace.
Path
;
766
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
776
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
797
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
817
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
855
var pythonBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
875
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
899
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
930
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
957
var pythonBuilder = builder.AddPythonApp("python-script", workspace.
Path
, "main.py");
976
var pythonBuilder = builder.AddPythonModule("flask-app", workspace.
Path
, "flask");
995
var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.
Path
, "pytest");
1016
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
1026
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1052
builder.AddPythonModule("pythonProject", workspace.
Path
, moduleName);
1060
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1086
builder.AddPythonExecutable("pythonProject", workspace.
Path
, executableName);
1094
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1117
var pythonBuilder = builder.AddPythonModule("flask-app", workspace.
Path
, "flask")
1141
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py")
1163
var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.
Path
, "pytest")
1185
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py")
1215
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py");
1262
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
1281
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1287
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
1300
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1307
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.
Path
));
1339
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1352
var manifest = await ManifestUtils.GetManifest(resource, workspace.
Path
);
1362
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1367
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1376
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1382
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1391
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1397
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1541
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1552
var manifest = await ManifestUtils.GetManifestForModel(appModel, workspace.
Path
);
1715
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1717
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1759
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1761
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1799
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1801
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1834
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1836
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1855
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1857
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1879
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1881
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1903
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1905
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1907
var customWorkingDirectory = Path.Combine(workspace.
Path
, "custom");
1930
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1932
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1934
var customWorkingDirectory = Path.Combine(workspace.
Path
, "custom");
1971
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1973
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
2004
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
2006
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
2033
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2055
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2073
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2326
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2330
var pyprojectPath = Path.Combine(workspace.
Path
, "pyproject.toml");
2333
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2360
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2364
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2367
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2395
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2399
var pyprojectPath = Path.Combine(workspace.
Path
, "pyproject.toml");
2401
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2404
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2425
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2428
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2449
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2453
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2472
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2476
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2480
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2500
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2504
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2508
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2529
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2532
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2557
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2561
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2564
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2600
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2603
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2606
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2630
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2633
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2636
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2664
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2667
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2671
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2700
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2703
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2707
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2730
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2733
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2737
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2762
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2765
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2769
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2794
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2797
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2800
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2830
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2833
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2865
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2884
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2887
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2890
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
Aspire.Hosting.Tests (440)
ConditionalReferenceExpressionTests.cs (4)
128
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
138
app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.
Path
).DefaultTimeout();
147
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
157
app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.
Path
);
Dashboard\DashboardEventHandlersTests.cs (1)
361
["Aspire:Store:Path"] = workspace.
Path
,
Dcp\ProcessCaptureTests.cs (14)
23
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "echo.cs", """
35
DotnetFileAppProcess.CreateArguments(app), workspace.
Path
, standardInput: Encoding.UTF8.GetBytes(input),
47
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "environment.cs", """
54
DotnetFileAppProcess.CreateArguments(app, arguments), workspace.
Path
,
58
Assert.Equal(new ProcessCaptureResult(0, "overridden|" + inheritedPath + "|ü|" + workspace.
Path
+ "|" + string.Join("|", arguments), ""), result);
67
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "pressure.cs", """
88
DotnetFileAppProcess.CreateArguments(app, [errorFirst.ToString()]), workspace.
Path
,
100
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "reject.cs", """
112
DotnetFileAppProcess.CreateArguments(app), workspace.
Path
, standardInput: new byte[inputSize], cancellationToken: cancellation.Token);
121
var missing = Path.Combine(workspace.
Path
, "missing-executable");
124
await Assert.ThrowsAsync<Win32Exception>(() => runner.RunAndCaptureTextAsync(missing, [], workspace.
Path
));
127
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => runner.RunAndCaptureTextAsync(missing, [], workspace.
Path
, cancellationToken: cancellation.Token));
137
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "cancel.cs", """
164
DotnetFileAppProcess.CreateArguments(app, [name]), workspace.
Path
, standardInput: new byte[2000000], cancellationToken: cancellation.Token);
Dcp\ProcessUtilTests.cs (1)
221
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "legacy-lines.cs", """
ManifestExpressionTests.cs (4)
97
var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.
Path
)
443
var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.
Path
)
514
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
524
app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.
Path
);
Pipelines\PipelineOutputDiffingLifetimeTests.cs (2)
33
outputPath: workspace.
Path
, step: "publish-and-diff");
144
outputPath: workspace.
Path
, step: "publish-and-diff");
Pipelines\PipelineOutputDiffingTests.cs (103)
26
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
62
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
94
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
166
var artifact = Path.Combine(workspace.
Path
, "artifact.bin");
167
var control = Path.Combine(workspace.
Path
, "control.bin");
189
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
222
var artifact = Path.Combine(workspace.
Path
, "early.txt");
223
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
250
var artifact = Path.Combine(workspace.
Path
, "factory.txt");
251
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "check-alias");
306
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
328
var artifact = Path.Combine(workspace.
Path
, "late.txt");
329
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
365
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
372
var artifact = Path.Combine(workspace.
Path
, "ordinary.txt");
388
var artifact = Path.Combine(workspace.
Path
, "tracked.tmp");
389
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "**/bin/\n**/obj/\n*.tmp\n", TestContext.Current.CancellationToken);
391
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
392
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.excludesFile", Path.Combine(workspace.
Path
, ".git", "info", "exclude"));
393
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "-f", "--", ".gitignore", "tracked.tmp");
395
Assert.Contains("tracked.tmp", await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "diff", "--name-only"));
396
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
401
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, "src", "Api", "bin")));
402
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, "src", "Api", "obj")));
413
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, "src")));
418
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
426
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "src", "Api", "bin", "Release", "Api.dll")));
427
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "src", "Api", "obj", "project.assets.json")));
443
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "**/bin/\n**/obj/\n", TestContext.Current.CancellationToken);
444
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
445
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.excludesFile", Path.Combine(workspace.
Path
, ".git", "info", "exclude"));
446
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", ".gitignore", "src", "generated");
447
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
466
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
498
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
547
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
568
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "generated/\n", TestContext.Current.CancellationToken);
569
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
570
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.excludesFile", Path.Combine(workspace.
Path
, ".git", "info", "exclude"));
571
Assert.Equal("generated/deployment.yaml", (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "check-ignore", "--", "generated/deployment.yaml")).Trim());
572
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
592
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
608
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitattributes"), "*.yaml text eol=lf\n", TestContext.Current.CancellationToken);
609
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "generated/\n", TestContext.Current.CancellationToken);
610
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
611
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.autocrlf", "false");
612
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.safecrlf", "false");
613
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.excludesFile", Path.Combine(workspace.
Path
, ".git", "info", "exclude"));
614
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", ".gitattributes", ".gitignore");
615
Assert.Equal("generated/deployment.yaml", (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "check-ignore", "--", "generated/deployment.yaml")).Trim());
616
var beforeObject = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "hash-object", "--", artifact);
617
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
632
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
635
var afterObject = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "hash-object", "--", artifact);
643
var artifact = Path.Combine(workspace.
Path
, "stable.txt");
645
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
658
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, ".git")));
662
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.Message);
696
var changed = Path.Combine(workspace.
Path
, "changed.txt");
697
var removed = Path.Combine(workspace.
Path
, "removed.txt");
698
var added = Path.Combine(workspace.
Path
, "added.txt");
701
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
718
Added: {Path.GetRelativePath(workspace.
Path
, added)}
719
Changed: {Path.GetRelativePath(workspace.
Path
, changed)}
720
Removed: {Path.GetRelativePath(workspace.
Path
, removed)}
733
var artifact = Path.Combine(workspace.
Path
, "unchanged.txt");
735
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
752
Assert.Contains("Changed: " + Path.GetRelativePath(workspace.
Path
, artifact), failure.ToString());
774
var artifact = Path.Combine(workspace.
Path
, "stable.txt");
776
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: selectBoth ? "both-checks" : "first-check");
836
var artifact = Path.Combine(workspace.
Path
, "result.txt");
837
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
867
var artifact = Path.Combine(workspace.
Path
, "custom.txt");
868
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "custom-check");
891
var artifact = Path.Combine(workspace.
Path
, "cancelled.txt");
892
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
918
var included = Path.Combine(workspace.
Path
, "included.txt");
919
var excluded = Path.Combine(workspace.
Path
, "excluded.tmp");
922
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
958
Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Removed: " + Path.GetRelativePath(workspace.
Path
, included), failure.Message);
967
var artifact = Path.Combine(workspace.
Path
, "tracked.txt");
968
var added = Path.Combine(workspace.
Path
, "untracked.txt");
969
var excluded = Path.Combine(workspace.
Path
, "excluded.tmp");
971
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
972
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "tracked.txt");
973
Assert.Empty(await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "diff", "--name-only"));
974
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "publish-and-diff");
976
builder.Services.AddTransient<IPipelineOutputSnapshotter<GitSnapshot>>(_ => new GitSnapshotter(workspace.
Path
));
991
Changed: {Path.GetRelativePath(workspace.
Path
, artifact)}
992
Added: {Path.GetRelativePath(workspace.
Path
, added)}
997
Assert.Equal("old", (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "show", ":tracked.txt")).Trim());
1005
var artifact = Path.Combine(workspace.
Path
, "stable.txt");
1007
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
, step: "both-checks");
1010
var comparer = new DirectoryComparer(workspace.
Path
, relocated);
1011
var provider = new CountingOutputService(workspace.
Path
, relocated);
1023
Assert.Equal(new[] { workspace.
Path
}, directories.Directories);
1033
Assert.Equal(new[] { workspace.
Path
}, directories.Directories);
1043
Assert.NotEqual(workspace.
Path
, relocated);
1048
Assert.Equal(new[] { workspace.
Path
, relocated }, directories.Directories);
Pipelines\PipelineOutputGitFingerprintTests.cs (107)
32
await InitializeAsync(workspace.
Path
, "sha1");
33
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitattributes"), "*.txt " + attributes + "\n");
37
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", ".gitattributes", "output/model.txt");
38
var index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
39
var objects = ReadObjects(workspace.
Path
);
40
var beforeOid = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "hash-object", "--", "output/model.txt");
45
var afterOid = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "hash-object", "--", "output/model.txt");
51
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
52
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
71
await InitializeAsync(workspace.
Path
, "sha1");
73
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitattributes"), "output*/**/*.txt filter=stripspace -text\n");
74
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.stripspace.clean", "git stripspace");
75
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.stripspace.required", "true");
82
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", gitPath);
90
var beforeOid = (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "hash-object", "--", gitPath)).TrimEnd('\r', '\n');
98
var afterOid = (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "hash-object", "--", gitPath)).TrimEnd('\r', '\n');
113
var indexed = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--cached", "--full-name", "-z", "--", gitPath);
114
var untracked = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--others", "--exclude-standard", "--full-name", "-z", "--", gitPath);
117
var status = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "status",
147
await InitializeAsync(workspace.
Path
, "sha1");
153
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
157
var indexPath = Path.Combine(workspace.
Path
, ".git", "index");
159
var objects = ReadObjects(workspace.
Path
);
172
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
201
await InitializeAsync(workspace.
Path
, "sha1");
202
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.filemode", "false");
205
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
206
var beforeEntry = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/model.txt");
208
var indexPath = Path.Combine(workspace.
Path
, ".git", "index");
214
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", "--chmod=+x", "--", "output/model.txt");
215
var afterEntry = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/model.txt");
231
await InitializeAsync(workspace.
Path
, "sha1");
239
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/link");
240
var entries = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/link");
242
var indexPath = Path.Combine(workspace.
Path
, ".git", "index");
244
var objects = ReadObjects(workspace.
Path
);
254
var status = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "status",
264
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
292
await InitializeAsync(workspace.
Path
, objectFormat);
293
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.symlinks", "true");
295
var target = Path.Combine(workspace.
Path
, "target.txt");
311
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/link");
312
var entry = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/link");
316
var linkBlob = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "cat-file", "blob", oid);
318
var index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
319
var objects = ReadObjects(workspace.
Path
);
323
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
324
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
333
var other = directoryLink ? workspace.CreateDirectory("other-target").FullName : Path.Combine(workspace.
Path
, "other-target.txt");
352
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
353
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
362
await InitializeAsync(workspace.
Path
, objectFormat);
371
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
372
var index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
373
var objects = ReadObjects(workspace.
Path
);
384
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
385
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
392
await InitializeAsync(workspace.
Path
, "sha1");
399
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
400
Assert.True(File.GetLastWriteTimeUtc(path) < File.GetLastWriteTimeUtc(Path.Combine(workspace.
Path
, ".git", "index")));
401
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitattributes"), "*.txt filter=reject\n");
402
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail");
403
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.required", "true");
404
var status = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "status",
407
var index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
408
var objects = ReadObjects(workspace.
Path
);
415
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
416
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
423
await InitializeAsync(workspace.
Path
, "sha1");
433
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/clean.keep");
434
Assert.True(File.GetLastWriteTimeUtc(clean) < File.GetLastWriteTimeUtc(Path.Combine(workspace.
Path
, ".git", "index")));
435
var log = Path.Combine(workspace.
Path
, "filter-pids");
436
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitattributes"), "*.txt filter=record\n*.keep filter=reject\n");
437
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail");
438
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.required", "true");
445
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.record.clean",
447
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.record.required", "true");
471
await InitializeAsync(workspace.
Path
, "sha1");
482
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.filemode", "false");
484
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
487
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", "--chmod=+x", "--", "output/model.txt");
488
Assert.StartsWith("100755 ", await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/model.txt"));
490
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", hint, "--", "output/model.txt");
491
var index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
498
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", "--chmod=-x", "--", "output/model.txt");
499
Assert.StartsWith("100644 ", await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/model.txt"));
500
index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
506
var status = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "--no-optional-locks", "status",
515
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
526
await InitializeAsync(workspace.
Path
, objectFormat);
527
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.symlinks", "true");
529
var target = Path.Combine(workspace.
Path
, "target.txt");
533
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
534
var entry = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--stage", "--", "output/model.txt");
537
Assert.Equal(canonicalTarget, await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "cat-file", "blob", entry.Split(' ')[1]));
540
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.symlinks", "false");
543
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", hint, "--", "output/model.txt");
545
var index = File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index"));
546
var objects = ReadObjects(workspace.
Path
);
565
Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.
Path
, ".git", "index")));
566
AssertObjectsEqual(objects, ReadObjects(workspace.
Path
));
573
await InitializeAsync(workspace.
Path
, "sha1");
577
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/model.txt");
595
await InitializeAsync(workspace.
Path
, "sha1");
601
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitattributes"), "*.txt filter=reject\n");
602
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail");
603
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.required", "true");
Pipelines\PipelineOutputResolutionTests.cs (11)
24
var artifact = Path.Combine(workspace.
Path
, "artifact.txt");
27
outputPath: workspace.
Path
, step: "publish-and-diff");
62
Assert.Equal(new(workspace.
Path
, "before"), comparison.Before);
63
Assert.Equal(new(workspace.
Path
, "after"), comparison.After);
79
outputPath: workspace.
Path
, step: "publish-and-diff");
117
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
119
var administration = Path.Combine(workspace.
Path
, ".git");
130
Directory.Move(administration, Path.Combine(workspace.
Path
, "saved-git"));
134
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init");
188
snapshotter.CaptureAsync(workspace.
Path
, cancellation.Token));
194
snapshotter.CaptureAsync(workspace.
Path
, cancellation.Token));
Pipelines\PipelineOutputSelectionTests.cs (93)
25
await InitializeGitAsync(workspace.
Path
);
61
await InitializeGitAsync(workspace.
Path
);
62
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken);
103
await InitializeGitAsync(workspace.
Path
);
123
await InitializeGitAsync(workspace.
Path
);
124
var artifact = Write(workspace.
Path
, "artifact.txt");
125
Assert.True(File.Exists(Path.Combine(workspace.
Path
, ".git", "HEAD")));
127
var selected = await SelectAsync(new() { Mode = mode }, workspace.
Path
);
139
await InitializeGitAsync(workspace.
Path
);
140
Write(workspace.
Path
, ".gitignore", "*.tmp\n");
146
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "-f", "--", "output/tracked.tmp");
163
await InitializeGitAsync(workspace.
Path
);
164
Write(workspace.
Path
, ".gitignore", "output/ignored/\n");
167
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "-f", "--", "output/ignored/child/model.json");
195
await InitializeGitAsync(workspace.
Path
);
196
Write(workspace.
Path
, ".gitignore", "output/ignored*\n");
200
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "-f", "--", "output/ignored/model.json");
202
var first = fileLink ? Write(workspace.
Path
, "first.txt", "same content") : workspace.CreateDirectory("first").FullName;
203
var second = fileLink ? Write(workspace.
Path
, "second.txt", "same content") : workspace.CreateDirectory("second").FullName;
214
Assert.Equal("output/ignored\n", (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
216
Assert.Equal("output/ignored/model.json\0", await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
218
Assert.Empty(await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
275
await InitializeGitAsync(workspace.
Path
);
276
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken);
306
await InitializeGitAsync(workspace.
Path
);
307
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken);
366
await InitializeGitAsync(workspace.
Path
);
367
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken);
368
var root = Path.Combine(workspace.
Path
, "output", "new");
384
await InitializeGitAsync(workspace.
Path
);
399
Directory.Move(Path.Combine(workspace.
Path
, ".git"), Path.Combine(workspace.
Path
, "saved-git"));
400
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, ".git")));
416
var artifact = Write(workspace.
Path
, "src/artifacts/model.json");
417
Write(workspace.
Path
, "src/artifacts/cache.tmp");
418
Write(workspace.
Path
, "src/Program.cs");
419
Write(workspace.
Path
, "README.md");
420
var special = Write(workspace.
Path
, "special.txt");
421
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
439
var selected = await SelectAsync(options, workspace.
Path
);
456
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
494
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
508
var path = Write(workspace.
Path
, "artifact.TMP");
514
var selected = await SelectAsync(options, workspace.
Path
);
546
await InitializeGitAsync(workspace.
Path
);
565
await InitializeGitAsync(workspace.
Path
);
592
await InitializeGitAsync(workspace.
Path
);
593
Write(workspace.
Path
, ".gitignore", "*.tmp\n");
597
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "-f", "--", "output/artifact.tmp", "output/visible.json");
605
var target = Write(workspace.
Path
, "external-target.json");
624
await InitializeGitAsync(workspace.
Path
);
626
var sibling = Write(workspace.
Path
, "output-sibling/outside.json");
627
var outer = Write(workspace.
Path
, "outside.json");
629
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", ".");
641
await InitializeGitAsync(workspace.
Path
);
673
await InitializeGitAsync(workspace.
Path
);
679
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/child/model.txt");
704
await InitializeGitAsync(workspace.
Path
);
706
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, ".gitignore"), "output/*.tmp\noutput/ignored/\n", TestContext.Current.CancellationToken);
713
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, ["add", "-f", "--", .. trackedPaths]);
717
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", "--split-index");
718
Assert.NotEmpty(Directory.GetFiles(Path.Combine(workspace.
Path
, ".git"), "sharedindex.*"));
721
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, ["update-index", "--skip-worktree", "--", .. trackedPaths]);
723
(await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "-t", "-z")).Split('\0', StringSplitOptions.RemoveEmptyEntries).Order());
726
Write(workspace.
Path
, "excluded/model.json");
727
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "excluded/model.json");
728
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
730
"-c", "core.hooksPath=" + Path.Combine(workspace.
Path
, ".git", "no-hooks"),
732
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "sparse-checkout", "set", "--cone", "--sparse-index", "output");
733
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, "excluded")));
734
Assert.Equal("040000", (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
743
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, ["add", "-f", "--", .. trackedPaths]);
744
trees.Add((await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "write-tree")).Trim());
747
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "read-tree", trees[1]);
748
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, ["read-tree", "-i", "-m", .. trees]);
750
(await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "--unmerged", "--format=%(stage)", "-z"))
774
await InitializeGitAsync(workspace.
Path
);
776
var ignore = Write(workspace.
Path
, ignorePath, "*.tmp\n");
777
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", ignorePath);
780
Write(workspace.
Path
, "keep/model.json");
781
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "keep/model.json");
782
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
784
"-c", "core.hooksPath=" + Path.Combine(workspace.
Path
, ".git", "no-hooks"),
786
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "sparse-checkout", "set", "--cone", "--sparse-index", "keep");
791
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "core.sparseCheckout", "false");
792
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", "--skip-worktree", "--", ignorePath);
794
Assert.Equal("false", (await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "--bool", "core.sparseCheckout")).Trim());
797
Assert.Equal("S " + ignorePath + '\0', await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "ls-files", "-t", "-z", "--", ignorePath));
827
await InitializeGitAsync(workspace.
Path
);
833
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/nested/model.json");
846
var ordinaryGitSelection = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
876
await InitializeGitAsync(workspace.
Path
);
880
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "update-index", "--add", "--cacheinfo",
Pipelines\PipelineOutputSnapshotterTests.cs (4)
335
var first = Write(workspace.
Path
, "first.txt", "alpha");
336
var second = Write(workspace.
Path
, "second.txt", "beta");
355
var capture = await snapshotter.CaptureAsync(workspace.
Path
);
564
var missingTarget = Path.Combine(workspace.
Path
, "missing.txt");
Pipelines\PipelineOutputStrategyTests.cs (45)
23
var path = Path.Combine(workspace.
Path
, "artifact.txt");
27
var beforeSnapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
29
var afterSnapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
41
var artifact = Path.Combine(workspace.
Path
, "artifact.txt");
43
var metadata = Path.Combine(workspace.
Path
, metadataPath.Replace('/', Path.DirectorySeparatorChar));
52
var snapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
60
snapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
65
snapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
81
var failure = await Assert.ThrowsAsync<DistributedApplicationException>(() => nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken));
92
var path = Path.Combine(workspace.
Path
, "artifact.txt");
96
var beforeSnapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
99
var afterSnapshot = await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
112
var missing = Path.Combine(workspace.
Path
, "missing");
129
var directory = Path.Combine(workspace.
Path
, "missing");
160
workspace.
Path
, runner, TestContext.Current.CancellationToken));
181
var failure = await Assert.ThrowsAsync<DistributedApplicationException>(() => nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken));
191
var path = Path.Combine(workspace.
Path
, "bad" + delimiter + "name.txt");
208
var target = directoryLink ? workspace.CreateDirectory("target").FullName : Path.Combine(workspace.
Path
, "target.txt");
254
var git = Assert.IsType<GitPipelineOutputReader>(await GitPipelineOutputReader.TryCreateAsync(workspace.
Path
, runner, TestContext.Current.CancellationToken));
255
var failure = await Assert.ThrowsAsync<DistributedApplicationException>(() => git.SelectFilesAsync(workspace.
Path
, PipelineOutputGitTestHelper.AllFilesMatcher(), TestContext.Current.CancellationToken));
267
var path = Path.Combine(workspace.
Path
, gitPath.Replace('/', Path.DirectorySeparatorChar));
273
await nativeSnapshotter.CaptureAsync(workspace.
Path
, TestContext.Current.CancellationToken);
294
parents.Length == 0 ? workspace.
Path
: directory, runner, TestContext.Current.CancellationToken));
416
var git = new GitPipelineOutputReader(workspace.
Path
, runner);
425
Assert.Empty(await git.SelectFilesAsync(workspace.
Path
, PipelineOutputGitTestHelper.AllFilesMatcher(), TestContext.Current.CancellationToken));
452
var git = new GitPipelineOutputReader(workspace.
Path
, runner);
455
var fileHashes = await git.HashFilesAsync([new FileInfo(Path.Combine(workspace.
Path
, "artifact.txt"))], TestContext.Current.CancellationToken);
481
var git = new GitPipelineOutputReader(workspace.
Path
, runner);
491
await git.HashFilesAsync([new FileInfo(Path.Combine(workspace.
Path
, "artifact.txt"))], TestContext.Current.CancellationToken);
540
var first = Path.Combine(workspace.
Path
, "first.txt");
541
var second = Path.Combine(workspace.
Path
, "second.txt");
547
var git = new GitPipelineOutputReader(workspace.
Path
, runner);
551
var snapshot = await snapshotter.CaptureAsync(workspace.
Path
, PipelineOutputGitTestHelper.AllFilesMatcher(), git, TestContext.Current.CancellationToken);
559
workspace.
Path
, PipelineOutputGitTestHelper.AllFilesMatcher(), git, TestContext.Current.CancellationToken));
571
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init", "--object-format=sha1");
576
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output/ignored-child/model.txt");
577
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitignore"), "output/ignored-child*\n");
584
Assert.Equal("output/ignored-child/model.txt\0", await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
586
Assert.Empty(await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
,
588
var status = await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "status", "--porcelain=v2", "-z", "--untracked-files=no", "--no-renames");
630
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "init", "--object-format=sha1");
635
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "add", "--", "output");
638
File.WriteAllText(Path.Combine(workspace.
Path
, ".gitattributes"), "*.txt filter=reject\n");
639
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail");
640
await PipelineOutputGitTestHelper.RunAsync(workspace.
Path
, "config", "filter.reject.required", "true");
PublishAsDockerfileTests.cs (1)
527
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)
114
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");