2194 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)
799
using var first = entra.Resource.GetBicepTemplateFile(workspace.
Path
);
801
using var second = entra.Resource.GetBicepTemplateFile(workspace.
Path
);
864
var manifest = await ManifestUtils.GetManifest(entra.Resource, workspace.
Path
);
874
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
887
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
891
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
892
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
899
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
910
workspace.
Path
,
918
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
919
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
926
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
935
workspace.
Path
,
946
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep");
953
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
968
workspace.
Path
,
976
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep")
977
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep")), "bicep");
984
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
999
workspace.
Path
,
1007
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "web", "web.bicep")), "bicep");
1014
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
1040
workspace.
Path
, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
1044
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
1045
var apiBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-api", "entra-api.bicep"));
1046
var webBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "entra-web", "entra-web.bicep"));
1047
var consumerBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "consumer", "consumer.bicep"));
1048
Assert.Equal(new[] { "consumer", "entra-api", "entra-web" }, Directory.GetDirectories(workspace.
Path
).Select(Path.GetFileName).Order());
1664
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)
444
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
480
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
938
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
972
var documentPath = Path.Combine(workspace.
Path
, "deploy-only.json");
996
var documentPath = Path.Combine(workspace.
Path
, "deploy-only.json");
1023
var documentPath = Path.Combine(workspace.
Path
, "generated.json");
1049
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
1143
var documentPath = Path.Combine(temporaryWorkspace.
Path
, "catalog.json");
2140
workspace.
Path
);
2153
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
AzureAppServiceTests.cs (10)
240
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "validate-appservice-config-env");
281
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "validate-appservice-config-env");
313
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "validate-appservice-config-env");
616
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
632
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
636
var envBicepPath = Path.Combine(workspace.
Path
, "env", "env.bicep");
640
var apiBicepPath = Path.Combine(workspace.
Path
, "api", "api.bicep");
812
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "publish-manifest");
833
Path.Combine(workspace.
Path
, "aspire-manifest.json"),
842
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)
553
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
566
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
570
var envBicepPath = Path.Combine(workspace.
Path
, "env", "env.bicep");
587
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
);
607
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)
2019
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.
Path
, step: "publish-manifest");
2037
await VerifyFile(Path.Combine(workspace.
Path
, "aspire-manifest.json"));
2141
workspace.
Path
,
2171
workspace.
Path
,
2291
workspace.
Path
,
2317
workspace.
Path
,
2346
workspace.
Path
,
2375
workspace.
Path
,
2835
File.WriteAllText(Path.Combine(workspace.
Path
, "Dockerfile"), "FROM alpine");
2837
builder.AddDockerfile("with-bind-mount", workspace.
Path
)
2838
.WithBindMount(workspace.
Path
, "/app/data");
AzureEnvironmentResourceTests.cs (24)
54
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
91
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
303
workspace.
Path
);
318
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
326
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
363
var mainBicep = File.ReadAllText(Path.Combine(workspace.
Path
, "main.bicep"));
372
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
379
var outputPath = Path.Combine(workspace.
Path
, "exclude-main");
401
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
406
var context = await CreatePublishingContextAsync(app, workspace.
Path
);
417
Assert.True(File.Exists(Path.Combine(workspace.
Path
, resourceName, $"{resourceName}.bicep")));
418
var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep"));
426
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
433
var outputPath = Path.Combine(workspace.
Path
, "write-main");
458
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
472
var outputPath = Path.Combine(workspace.
Path
, "provider");
521
output, workspace.
Path
);
535
var mainBicepPath = Path.Combine(workspace.
Path
, "main.bicep");
540
var includedStorageBicepPath = Path.Combine(workspace.
Path
, "included-storage", "included-storage.bicep");
544
var excludedStorageBicepPath = Path.Combine(workspace.
Path
, "excluded-storage", "excluded-storage.bicep");
554
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.
Path
);
566
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
579
remoteInvokeOptions.StartInfo.WorkingDirectory = workspace.
Path
;
580
using var handle = RemoteExecutor.Invoke(RunTest, workspace.
Path
, remoteInvokeOptions);
AzureFrontDoorAppServicePrivateLinkTests.cs (4)
21
DistributedApplicationOperation.Publish, testOutputHelper, workspace.
Path
);
31
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "main.bicep")), "bicep");
32
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "api", "api.bicep")));
33
Assert.True(File.Exists(Path.Combine(workspace.
Path
, "frontdoor", "frontdoor.bicep")));
AzureFunctionsTests.cs (30)
307
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
330
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
355
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript)
379
builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
405
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript)
432
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.JavaScript)
458
builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
470
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
471
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock);
475
var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
504
var dockerfilePath = Path.Combine(tempDir.
Path
, "funcapp.Dockerfile");
524
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
525
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock);
529
await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
543
var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.
Path
, "funcapp.Dockerfile"));
556
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
557
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock: true);
562
var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.
Path
);
566
Assert.False(File.Exists(Path.Combine(tempDir.
Path
, "funcapp.Dockerfile")));
576
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
581
var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.
Path
, includePackageLock: true);
600
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.TypeScript);
614
var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.
Path
, AzureFunctionsLanguage.JavaScript);
965
var projectPath = Path.Combine(workspace.
Path
, "TestFunctions.csproj");
990
var projectPath = Path.Combine(workspace.
Path
, "MyFunctions.csproj");
1012
var projectPath = Path.Combine(workspace.
Path
, "TestFunctions.csproj");
1042
var projectPath1 = Path.Combine(workspace.
Path
, "Functions1.csproj");
1043
var projectPath2 = Path.Combine(workspace.
Path
, "Functions2.csproj");
1064
var projectPath = Path.Combine(workspace.
Path
, "Functions.csproj");
1094
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 (147)
DockerComposePublisherTests.cs (106)
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
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
505
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
513
var envFilePath = Path.Combine(workspace.
Path
, ".env");
517
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
544
var envFilePath = Path.Combine(workspace.
Path
, ".env");
548
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
585
var envFilePath = Path.Combine(workspace.
Path
, ".env");
588
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
604
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
618
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
630
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
644
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
659
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
676
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
691
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
707
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
722
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
735
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
748
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
769
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
780
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
793
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
808
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
821
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
837
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
851
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
865
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
880
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
893
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
912
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
924
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
937
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
949
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, workspace.
Path
);
961
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
970
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
988
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
998
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1017
var envFilePath = Path.Combine(workspace.
Path
, ".env.Staging");
1030
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1051
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1061
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1073
var envFilePath = Path.Combine(workspace.
Path
, ".env.Production");
1094
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1107
var envFilePath = Path.Combine(workspace.
Path
, ".env.Staging");
1124
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1140
var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "docker-compose.yaml"));
1141
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1151
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1173
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1182
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "prepare-docker-compose");
1199
var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".env.Production"));
1210
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1224
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1225
var envPath = Path.Combine(workspace.
Path
, ".env");
1238
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1251
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1267
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1282
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1283
var envPath = Path.Combine(workspace.
Path
, ".env");
1295
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1310
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1321
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1346
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1347
var envPath = Path.Combine(workspace.
Path
, ".env");
1360
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1394
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1395
var envPath = Path.Combine(workspace.
Path
, ".env");
1414
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1428
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1429
var envPath = Path.Combine(workspace.
Path
, ".env");
1441
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1472
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1482
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1506
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
1516
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1534
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
DockerComposeTests.cs (25)
51
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
63
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
71
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
85
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
152
var outputPath = Path.Combine(workspace.
Path
, "output");
179
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
191
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
203
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
225
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
239
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
264
var composeFile = Path.Combine(workspace.
Path
, "docker-compose.yaml");
324
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: step);
351
var composePath = Path.Combine(workspace.
Path
, "docker-compose.yaml");
378
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
427
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: step);
693
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "push-servicea");
724
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: "push-servicea");
761
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
809
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Diagnostics);
969
["OutputPath"] = workspace.
Path
,
971
["ComposeFilePath"] = Path.Combine(workspace.
Path
, "docker-compose.yaml")
975
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
1012
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Destroy);
1044
var deployBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
, step: WellKnownPipelineSteps.Deploy);
1068
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 (377)
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 (275)
54
options => options.ProjectDirectory = workspace.
Path
,
116
options => options.ProjectDirectory = workspace.
Path
,
119
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
147
var globalJsonPath = Path.Combine(workspace.
Path
, "global.json");
152
options => options.ProjectDirectory = workspace.
Path
,
161
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
208
options => options.ProjectDirectory = workspace.
Path
,
218
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
219
var firstDotnetPath = Path.Combine(workspace.
Path
, "first-sdk");
220
var secondDotnetPath = Path.Combine(workspace.
Path
, "second-sdk");
280
options => options.ProjectDirectory = workspace.
Path
,
284
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
302
var sharedProject = CreateSharedProject(workspace.
Path
);
303
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
305
options => options.ProjectDirectory = workspace.
Path
,
359
options => options.ProjectDirectory = workspace.
Path
,
371
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
393
options => options.ProjectDirectory = workspace.
Path
,
402
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
426
options => options.ProjectDirectory = workspace.
Path
,
438
var sharedProject = CreateSharedProject(workspace.
Path
);
439
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
440
var filePath = CreateFileApp(workspace.
Path
, "Worker", sharedProject);
482
options => options.ProjectDirectory = workspace.
Path
,
491
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
512
options => options.ProjectDirectory = workspace.
Path
,
521
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
544
options => options.ProjectDirectory = workspace.
Path
,
549
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
566
options => options.ProjectDirectory = workspace.
Path
,
575
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
593
options => options.ProjectDirectory = workspace.
Path
,
595
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
637
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
689
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
774
options => options.ProjectDirectory = workspace.
Path
,
777
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
784
Path.Combine(workspace.
Path
, "artifacts");
806
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
833
options => options.ProjectDirectory = workspace.
Path
,
836
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
837
var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "worker"));
922
options => options.ProjectDirectory = workspace.
Path
,
924
var sharedProject = CreateSharedProject(workspace.
Path
);
925
var firstPath = CreateFileApp(workspace.
Path
, "First", sharedProject);
926
var secondPath = CreateFileApp(workspace.
Path
, "Second", sharedProject);
927
var firstSentinel = Path.Combine(workspace.
Path
, "first-ran.txt");
928
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
997
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1097
options => options.ProjectDirectory = workspace.
Path
,
1099
var firstProject = CreateProject(workspace.
Path
, "First's Project", "First.csproj");
1100
var secondProject = CreateProject(workspace.
Path
, "Second", "Second.csproj");
1129
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1130
var customTargetsPath = Path.Combine(workspace.
Path
, "CustomNuGet.targets");
1140
workspace.
Path
,
1141
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1145
workspace.
Path
,
1153
WorkingDirectory = workspace.
Path
,
1184
var projectPath = CreateProjectFile(workspace.
Path
, "Service", """
1193
workspace.
Path
,
1194
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1198
workspace.
Path
,
1204
var missingTargetsPath = Path.Combine(workspace.
Path
, "missing", "NuGet.targets");
1207
WorkingDirectory = workspace.
Path
,
1240
using var builder = TestDistributedApplicationBuilder.Create(options => options.ProjectDirectory = workspace.
Path
, outputHelper);
1241
var aspireStoreRoot = Path.Combine(workspace.
Path
, "custom-obj");
1243
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1259
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1260
var buildDirectory = Path.Combine(workspace.
Path
, "obj", ".aspire", "build");
1261
using var unified = new DotnetProjectBuildResource("unified", workspace.
Path
, buildDirectory, TimeProvider.System);
1262
using var individual = new DotnetProjectBuildResource("individual", workspace.
Path
, buildDirectory, TimeProvider.System);
1263
unified.ConfigureTraversalBuild([projectPath], workspace.
Path
, buildConfiguration: null, restoreProjectsIndividually: false);
1264
individual.ConfigureTraversalBuild([projectPath], workspace.
Path
, buildConfiguration: null, restoreProjectsIndividually: true);
1282
options => options.ProjectDirectory = workspace.
Path
,
1284
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
1381
workspace.
Path
,
1382
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
1386
workspace.
Path
,
1433
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1468
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
1527
options => options.ProjectDirectory = workspace.
Path
,
1530
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1615
options => options.ProjectDirectory = workspace.
Path
,
1617
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1618
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1638
options => options.ProjectDirectory = workspace.
Path
,
1640
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1641
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1661
options => options.ProjectDirectory = workspace.
Path
,
1663
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1664
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1690
options => options.ProjectDirectory = workspace.
Path
,
1692
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1693
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1712
options => options.ProjectDirectory = workspace.
Path
,
1714
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1715
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1738
options => options.ProjectDirectory = workspace.
Path
,
1756
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1776
options => options.ProjectDirectory = workspace.
Path
,
1778
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1805
options => options.ProjectDirectory = workspace.
Path
,
1808
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
1809
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1864
options => options.ProjectDirectory = workspace.
Path
,
1866
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1900
options => options.ProjectDirectory = workspace.
Path
,
1902
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1939
options => options.ProjectDirectory = workspace.
Path
,
1942
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
1990
options => options.ProjectDirectory = workspace.
Path
,
1993
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2060
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
2108
options => options.ProjectDirectory = workspace.
Path
,
2110
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2154
options => options.ProjectDirectory = workspace.
Path
,
2157
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2210
options => options.ProjectDirectory = workspace.
Path
,
2213
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2268
options => options.ProjectDirectory = workspace.
Path
,
2271
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2329
var projectPath = CreateBrokenProject(workspace.
Path
, "COORDINATED_BUILD_MARKER");
2336
options.ProjectDirectory = workspace.
Path
;
2379
options => options.ProjectDirectory = workspace.
Path
,
2381
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2431
options => options.ProjectDirectory = workspace.
Path
,
2433
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2465
options => options.ProjectDirectory = workspace.
Path
,
2467
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2505
options => options.ProjectDirectory = workspace.
Path
,
2507
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2576
options => options.ProjectDirectory = workspace.
Path
,
2578
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
2579
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2606
options => options.ProjectDirectory = workspace.
Path
,
2608
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2629
options => options.ProjectDirectory = workspace.
Path
,
2631
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2651
options => options.ProjectDirectory = workspace.
Path
,
2653
var appPath = Path.Combine(workspace.
Path
, "app.cs");
2671
options => options.ProjectDirectory = workspace.
Path
,
2673
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2712
options => options.ProjectDirectory = workspace.
Path
,
2714
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2842
options => options.ProjectDirectory = workspace.
Path
,
2844
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2923
options => options.ProjectDirectory = workspace.
Path
,
2925
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
2974
options => options.ProjectDirectory = workspace.
Path
,
2976
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
3044
options => options.ProjectDirectory = workspace.
Path
,
3046
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
3073
options => options.ProjectDirectory = workspace.
Path
,
3075
var apiPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
3076
var workerPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
3114
var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.
Path
);
3170
options => options.ProjectDirectory = workspace.
Path
,
3172
var projectPath = CreateProject(workspace.
Path
, "Worker", "Worker.csproj");
3174
var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime-1")).FullName;
3175
var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "sdk-runtime-2")).FullName;
3220
options => options.ProjectDirectory = workspace.
Path
,
3222
var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "source")).FullName;
3226
var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime")).FullName;
3245
options => options.ProjectDirectory = workspace.
Path
,
3248
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "source")).FullName,
3252
var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "foreign")).FullName;
3280
options => options.ProjectDirectory = workspace.
Path
,
3282
var activePath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
3283
var removedPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
3304
options => options.ProjectDirectory = workspace.
Path
,
3306
var activePath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
3307
var replacedPath = CreateProject(workspace.
Path
, "Replaced", "Replaced.csproj");
3314
@event.Model.Resources[index] = new ExecutableResource(replaced.Resource.Name, "dotnet", workspace.
Path
);
3330
options => options.ProjectDirectory = workspace.
Path
,
3332
var projectPath = CreateProject(workspace.
Path
, "Project", "Project.csproj");
3333
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
3380
options => options.ProjectDirectory = workspace.
Path
,
3382
var firstPath = CreateProject(workspace.
Path
, "First", "First.csproj");
3383
var secondPath = CreateProject(workspace.
Path
, "Second", "Second.csproj");
3427
options => options.ProjectDirectory = workspace.
Path
,
3429
var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "Physical"));
3439
var linkPath = Path.Combine(workspace.
Path
, "Alias");
3450
var otherProjectPath = CreateProject(workspace.
Path
, "Other", "Other.csproj");
3477
options => options.ProjectDirectory = workspace.
Path
,
3479
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3501
options => options.ProjectDirectory = workspace.
Path
,
3503
var removedProjectPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
3510
var activeProjectPath = CreateProject(workspace.
Path
, "Active", "Active.csproj");
3531
options => options.ProjectDirectory = workspace.
Path
,
3533
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3561
options => options.ProjectDirectory = workspace.
Path
,
3563
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3594
options => options.ProjectDirectory = workspace.
Path
,
3596
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3627
options => options.ProjectDirectory = workspace.
Path
,
3629
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3652
options => options.ProjectDirectory = workspace.
Path
,
3654
var projectPath = CreateProject(workspace.
Path
, "Service", "Service.csproj");
3655
var removedPath = CreateProject(workspace.
Path
, "Removed", "Removed.csproj");
3656
var missingPath = Path.Combine(workspace.
Path
, "Missing", "Missing.csproj");
3679
options => options.ProjectDirectory = workspace.
Path
,
3681
var firstPath = CreateProject(workspace.
Path
, "First", "First.csproj");
3682
var secondPath = CreateProject(workspace.
Path
, "Second", "Second.csproj");
3738
options => options.ProjectDirectory = workspace.
Path
,
3740
var projectPath = CreateProject(workspace.
Path
, "Service", "App.csproj");
3741
var linkDirectory = Path.Combine(workspace.
Path
, "ServiceAlias");
3780
workspace.
Path
,
3781
Path.Combine(workspace.
Path
, "obj", ".aspire", "build"),
3783
buildResource.AddProject(CreateProject(workspace.
Path
, "Api", "Api.csproj"));
3830
var sharedProject = CreateSharedProject(workspace.
Path
);
3831
var apiProject = CreateConsoleProject(workspace.
Path
, "Api", sharedProject, extension);
3832
var workerProject = CreateConsoleProject(workspace.
Path
, "Worker", sharedProject, workerExtension);
3833
var escapedDirectory = Path.Combine(workspace.
Path
, "Api's Project 100% (test)");
3836
var apiSentinel = Path.Combine(workspace.
Path
, "api-ran.txt");
3837
var workerSentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
3840
options => options.ProjectDirectory = workspace.
Path
,
3891
var sharedProject = CreateSharedProject(workspace.
Path
);
3892
var projectPath = CreateConsoleProject(workspace.
Path
, "Api", sharedProject);
3900
var sentinels = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "instances")).FullName;
3902
options => options.ProjectDirectory = workspace.
Path
,
3957
var projectPath = CreateBrokenProject(workspace.
Path
, "REPLICAS_BUILD_FAILED");
3959
options => options.ProjectDirectory = workspace.
Path
,
3991
var firstProject = CreateSentinelProject(workspace.
Path
, "First", """
3996
var secondProject = CreateSentinelProject(workspace.
Path
, "Second", """
4004
var firstSentinel = Path.Combine(workspace.
Path
, "first-ran.txt");
4005
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
4008
options => options.ProjectDirectory = workspace.
Path
,
4076
var project = CreateSentinelProject(workspace.
Path
, "Worker", $$"""
4082
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
4085
options => options.ProjectDirectory = workspace.
Path
,
4117
var brokenProject = CreateBrokenProject(workspace.
Path
, "FIRST_BUILD_FAILED");
4118
var secondBuildMarker = Path.Combine(workspace.
Path
, "second-built.txt");
4119
var secondProject = CreateSentinelProject(workspace.
Path
, "Second", $$"""
4124
var secondSentinel = Path.Combine(workspace.
Path
, "second-ran.txt");
4127
options => options.ProjectDirectory = workspace.
Path
,
4172
var validProject = CreateProjectFile(workspace.
Path
, "Valid", """
4183
var sentinelPath = Path.Combine(workspace.
Path
, "valid-ran.txt");
4184
var missingProject = Path.Combine(workspace.
Path
, "Missing", "Missing.csproj");
4187
options => options.ProjectDirectory = workspace.
Path
,
4229
options => options.ProjectDirectory = workspace.
Path
,
4237
var missingPath = Path.Combine(workspace.
Path
, "Missing", $"Missing.{extension}");
4265
var projectPath = CreateProjectFile(workspace.
Path
, "EnvironmentBuild", $$"""
4291
var sentinelPath = Path.Combine(workspace.
Path
, "environment-build-ran.txt");
4296
options => options.ProjectDirectory = workspace.
Path
,
4387
var projectPath = CreateProjectWithBuildProducedRunPropertiesSentinel(workspace.
Path
);
4390
options => options.ProjectDirectory = workspace.
Path
,
4446
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4447
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
4450
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4479
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4481
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4551
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4553
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4595
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4597
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4630
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4632
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4679
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4680
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
4683
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
4713
var projectPath = CreateProject(workspace.
Path
, "Api", "Api.csproj");
4714
var filePath = Path.Combine(workspace.
Path
, "worker.cs");
4717
options => options.ProjectDirectory = workspace.
Path
,
4776
var projectPath = CreateProject(workspace.
Path
, "EnvironmentBuild", "EnvironmentBuild.csproj");
4779
options => options.ProjectDirectory = workspace.
Path
,
4785
Path.Combine(workspace.
Path
, "missing-dotnet");
4820
var brokenProject = CreateBrokenProject(workspace.
Path
, buildLogMarker);
4821
var fileApp = Path.Combine(workspace.
Path
, "worker.cs");
4822
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
4832
options => options.ProjectDirectory = workspace.
Path
,
4883
var releaseBuild = Path.Combine(workspace.
Path
, "release-build");
4884
var brokenProject = CreateGatedBrokenProject(workspace.
Path
, releaseBuild);
4885
var fileApp = Path.Combine(workspace.
Path
, "worker.cs");
4886
var sentinel = Path.Combine(workspace.
Path
, "worker-ran.txt");
4896
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)
165
"project" => CreateFile(workspace.
Path
, "MyService.csproj"),
166
"fsharp-project" => CreateFile(workspace.
Path
, "MyService.fsproj"),
167
"visualbasic-project" => CreateFile(workspace.
Path
, "MyService.vbproj"),
168
"directory" => CreateProjectDirectory(workspace.
Path
),
169
"file" => CreateFile(workspace.
Path
, "service.cs"),
176
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
178
var expectedPath = Path.GetRelativePath(workspace.
Path
, metadata.ProjectPath).Replace('\\', '/');
192
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
209
var resource = new DotnetProjectResource("svc", workspace.
Path
);
211
() => ManifestUtils.GetManifest(resource, workspace.
Path
));
223
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
231
var manifest = await ManifestUtils.GetManifestOrNull(resource.Resource, workspace.
Path
);
239
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
247
var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.
Path
);
255
var projectPath = CreateFile(workspace.
Path
, "MyService.csproj");
256
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "Dockerfile"), "FROM scratch");
265
var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.
Path
);
295
var appPath = Path.Combine(workspace.
Path
, "app.cs");
302
var archivePath = Path.Combine(workspace.
Path
, "app.tar.gz");
332
var sentinelDockerfilePath = Path.Combine(workspace.
Path
, "Dockerfile.sentinel");
333
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "sentinel.txt"), marker, cancellation.Token);
336
workspace.
Path
,
401
var projectPath = Path.Combine(workspace.
Path
, "Project.csproj");
408
context.OutputPath = Path.Combine(workspace.
Path
, "project.tar");
427
var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "project"));
429
var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "runtime"));
453
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
471
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "AmbiguousService"));
540
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
674
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
744
var projectDir = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "MyService"));
1127
var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "project"));
1154
var archivePath = Path.Combine(workspace.
Path
, "project.tar.gz");
DotnetProjectRunPropertiesResolverTests.cs (6)
21
var projectPath = Path.Combine(workspace.
Path
, "Broken.csproj");
40
workspace.
Path
,
57
var projectPath = Path.Combine(workspace.
Path
, "Warning.csproj");
77
workspace.
Path
,
86
Path.Combine(workspace.
Path
, "bin"),
87
Path.Combine(workspace.
Path
, "bin", "app.dll"),
MsTestCollectorTests.cs (9)
48
File.WriteAllText(Path.Combine(workspace.
Path
, "runner reports", "results.trx"),
71
var path = Path.Combine(workspace.
Path
, "runner reports", "results.trx");
115
File.WriteAllText(Path.Combine(workspace.
Path
, "runner reports", "results.trx"), failure == "malformed"
169
var source = Path.Combine(workspace.
Path
, "runner reports");
207
var target = Path.Combine(workspace.
Path
, "outside.trx");
220
File.CreateSymbolicLink(Path.Combine(workspace.
Path
, "runner reports", "results.trx"), target);
237
File.Copy(Path.Combine(MSBuildUtils.GetRepoRoot(), "NuGet.config"), Path.Combine(workspace.
Path
, "NuGet.config"));
313
builder.Configuration[KnownConfigNames.TestOutputPath] = Path.Combine(workspace.
Path
, "test output");
320
var path = Path.Combine(workspace.
Path
, "tests.csproj");
MsTestResourceTests.cs (15)
46
options => options.ProjectDirectory = workspace.
Path
, outputHelper);
49
builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.
Path
, "reports with spaces");
51
var resource = builder.AddMsTest("tests", Path.GetRelativePath(workspace.
Path
, path),
104
var path = Path.Combine(workspace.
Path
, "tests.csproj");
107
builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.
Path
, "reports");
123
var path = Path.Combine(workspace.
Path
, "tests.csproj");
126
builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.
Path
, "reports");
127
var api = builder.AddResource(new DotnetProjectResource("api", workspace.
Path
)).WithHttpEndpoint();
142
var path = Path.Combine(workspace.
Path
, "tests.csproj");
145
builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.
Path
, "reports");
174
var path = Path.Combine(workspace.
Path
, "tests.csproj");
177
builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.
Path
, "reports");
195
Assert.Throws<ArgumentException>(() => builder.AddMsTest("tests", workspace.
Path
));
196
Assert.Throws<FileNotFoundException>(() => builder.AddMsTest("tests", Path.Combine(workspace.
Path
, "missing.csproj")));
197
var path = Path.Combine(workspace.
Path
, "tests.csproj");
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)
1014
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1019
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1074
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1078
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1087
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1092
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1101
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1106
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)
57
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
59
var appDir = Path.Combine(workspace.
Path
, "js");
69
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
71
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
85
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
87
var appDir = Path.Combine(workspace.
Path
, "js");
96
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
98
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
108
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
110
var appDir = Path.Combine(workspace.
Path
, "js");
116
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
121
var perDockerfileIgnorePath = Path.Combine(workspace.
Path
, "js.Dockerfile.dockerignore");
140
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
142
var appDir = Path.Combine(workspace.
Path
, "js");
147
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
149
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
175
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
177
var appDir = Path.Combine(workspace.
Path
, "js");
184
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
186
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
195
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
197
var appDir = Path.Combine(workspace.
Path
, "js");
207
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
209
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
219
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
221
var appDir = Path.Combine(workspace.
Path
, "js");
233
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
235
await Verify(File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile")));
242
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
244
var appDir = Path.Combine(workspace.
Path
, "js");
251
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
253
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
262
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
264
var appDir = Path.Combine(workspace.
Path
, "js");
276
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
278
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
289
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
291
var appDir = Path.Combine(workspace.
Path
, "js");
300
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
302
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
315
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
317
var appDir = Path.Combine(workspace.
Path
, "js");
331
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
333
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
346
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
348
var appDir = Path.Combine(workspace.
Path
, "js");
355
() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
366
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
368
var appDir = Path.Combine(workspace.
Path
, "js");
375
() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
386
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
388
var appDir = Path.Combine(workspace.
Path
, "js");
396
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
398
var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.
Path
, "js.Dockerfile"));
410
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
412
var appDir = Path.Combine(workspace.
Path
, "js");
421
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
423
var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.
Path
, "js.Dockerfile"));
435
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
437
var appDir = Path.Combine(workspace.
Path
, "js");
441
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
443
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
453
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
455
var appDir = Path.Combine(workspace.
Path
, "js");
460
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
462
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
472
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
474
var appDir = Path.Combine(workspace.
Path
, "js");
481
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
483
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
499
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
501
var appDir = Path.Combine(workspace.
Path
, "js");
508
() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
518
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
520
var appDir = Path.Combine(workspace.
Path
, "js");
527
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
529
Assert.False(File.Exists(Path.Combine(workspace.
Path
, "js.Dockerfile")));
536
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
538
var appDir = Path.Combine(workspace.
Path
, "js");
548
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
550
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
563
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
565
var appDir = Path.Combine(workspace.
Path
, "js");
579
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
581
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
606
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
608
var appDir = Path.Combine(workspace.
Path
, "js");
615
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
619
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
627
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
629
var appDir = Path.Combine(workspace.
Path
, "js");
636
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
640
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
648
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
650
var appDir = Path.Combine(workspace.
Path
, "js");
659
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
661
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
670
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
672
var appDir = Path.Combine(workspace.
Path
, "js");
681
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
684
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
692
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
694
var appDir = Path.Combine(workspace.
Path
, "js");
703
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
705
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
721
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
723
var appDir = Path.Combine(workspace.
Path
, "js");
741
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
743
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
752
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
754
var appDir = Path.Combine(workspace.
Path
, "js");
762
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
764
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
856
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
858
var appDir = Path.Combine(workspace.
Path
, "js");
868
await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
870
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
880
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
882
var appDir = Path.Combine(workspace.
Path
, "js");
889
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
891
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
899
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
901
var appDir = Path.Combine(workspace.
Path
, "js");
908
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
910
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
918
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
920
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
923
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
));
932
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
934
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
938
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
));
947
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
949
var appDir = Path.Combine(workspace.
Path
, "js");
956
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
958
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
968
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
970
var appDir = Path.Combine(workspace.
Path
, "js");
979
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
981
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
991
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
993
var appDir = Path.Combine(workspace.
Path
, "js");
1000
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1002
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1017
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1019
var appDir = Path.Combine(workspace.
Path
, "js");
1025
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1027
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1035
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1037
var appDir = Path.Combine(workspace.
Path
, "js");
1044
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1046
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1056
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1058
var appDir = Path.Combine(workspace.
Path
, "js");
1065
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1067
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1077
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1079
var appDir = Path.Combine(workspace.
Path
, "js");
1088
var manifest = await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1091
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1103
var appDir = Path.Combine(workspace.
Path
, "js");
1121
var appDir = Path.Combine(workspace.
Path
, "js");
1148
var appDir = Path.Combine(workspace.
Path
, "js");
1177
var appDir = Path.Combine(workspace.
Path
, "js");
1196
var appDir = Path.Combine(workspace.
Path
, "js");
1223
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1225
var appDir1 = Path.Combine(workspace.
Path
, "js1");
1226
var appDir2 = Path.Combine(workspace.
Path
, "js2");
1238
await ManifestUtils.GetManifest(denoApp2.Resource, workspace.
Path
);
1240
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js2.Dockerfile"));
1250
File.WriteAllText(Path.Combine(workspace.
Path
, "main.ts"), "console.log('hi');");
1254
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1272
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
1276
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1299
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
1303
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1321
File.WriteAllText(Path.Combine(workspace.
Path
, "main.ts"), "console.log('hi');");
1324
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
1489
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
1504
var app = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
1521
var app = builder.AddJavaScriptApp("js", workspace.
Path
)
1538
var app = builder.AddJavaScriptApp("js", workspace.
Path
)
1556
builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
1573
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1575
var appDir = Path.Combine(workspace.
Path
, "js");
1582
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1584
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1597
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1599
var appDir = Path.Combine(workspace.
Path
, "js");
1607
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1609
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1624
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1626
var appDir = Path.Combine(workspace.
Path
, "js");
1633
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1635
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1644
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1646
var appDir = Path.Combine(workspace.
Path
, "js");
1652
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
1654
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "js.Dockerfile"));
1679
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
1681
var appDir = Path.Combine(workspace.
Path
, "js");
1688
() => ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
));
2292
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2332
var exception = Assert.Throws<ArgumentException>(() => builder.AddDenoApp("denoapp", workspace.
Path
, scriptPath));
2343
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
2345
var appDir = Path.Combine(workspace.
Path
, "deno-app");
2354
await ManifestUtils.GetManifest(denoApp.Resource, workspace.
Path
);
2356
var dockerfilePath = Path.Combine(workspace.
Path
, "deno-app.Dockerfile");
2526
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2539
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2551
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2565
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
2572
Assert.Equal(Path.GetFullPath("main.ts", workspace.
Path
), launchConfig.ScriptPath);
2583
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
2585
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2601
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
2603
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2620
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
2622
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2639
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2655
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts")
2674
var denoApp = builder.AddDenoApp("denoapp", workspace.
Path
, "main.ts");
AddJavaScriptAppTests.cs (83)
22
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
24
var appDir = Path.Combine(workspace.
Path
, "js");
31
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
33
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
44
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
46
var appDir = Path.Combine(workspace.
Path
, "js");
54
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
56
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
64
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
66
var appDir = Path.Combine(workspace.
Path
, "js");
74
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
76
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
84
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
86
var appDir = Path.Combine(workspace.
Path
, "js");
94
await ManifestUtils.GetManifest(yarnApp.Resource, workspace.
Path
);
96
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
106
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
109
var appDir = Path.Combine(workspace.
Path
, "js");
121
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
123
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
133
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
135
var appDir = Path.Combine(workspace.
Path
, "js");
142
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
144
var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
167
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
169
var appDir = Path.Combine(workspace.
Path
, "js");
182
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
184
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
194
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
196
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
200
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
211
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
213
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
219
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.
Path
));
230
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
232
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
237
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
251
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
272
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
294
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
319
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
339
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
341
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
345
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
354
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
356
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
363
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
373
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
375
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
382
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
391
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
393
var appDir = CreateJavaScriptAppWithDockerfile(workspace.
Path
);
398
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
409
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
411
var appDir = Path.Combine(workspace.
Path
, "js");
420
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
422
var dockerfilePath = Path.Combine(workspace.
Path
, "js.Dockerfile");
440
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
442
var appDir = Path.Combine(workspace.
Path
, "js");
456
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
458
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
474
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
476
var appDir = Path.Combine(workspace.
Path
, "js");
491
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
493
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
506
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
508
var appDir = Path.Combine(workspace.
Path
, "js");
522
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
524
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
535
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
537
var appDir = Path.Combine(workspace.
Path
, "js");
551
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
553
var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "js.Dockerfile"));
574
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
576
var appDir = Path.Combine(workspace.
Path
, "js");
600
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
603
var appDir = Path.Combine(workspace.
Path
, "pnpm-app");
623
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
625
var dockerfilePath = Path.Combine(workspace.
Path
, "pnpm-app.Dockerfile");
696
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
698
var appDir = Path.Combine(workspace.
Path
, "pnpm-app");
719
await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.
Path
);
721
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");
439
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
452
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
464
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
);
477
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
)
504
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
)
521
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
)
538
var resource = new JavaScriptAppResource("jsapp", "npm", workspace.
Path
);
559
File.WriteAllText(Path.Combine(workspace.
Path
, "app.js"), "console.log('hello');");
561
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js")
597
var nodeApp = builder.AddNodeApp("nodeapp", workspace.
Path
, "app.js");
604
Assert.Equal(Path.GetFullPath("app.js", workspace.
Path
), launchConfig.ScriptPath);
613
var viteApp = builder.AddViteApp("viteapp", workspace.
Path
);
AddViteAppTests.cs (101)
22
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
25
var viteDir = Path.Combine(workspace.
Path
, "vite");
34
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
60
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
84
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
86
var viteDir = Path.Combine(workspace.
Path
, "vite");
94
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
96
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
110
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
112
var viteDir = Path.Combine(workspace.
Path
, "vite");
116
var apiDir = Path.Combine(workspace.
Path
, "api");
127
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
129
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
137
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
139
var viteDir = Path.Combine(workspace.
Path
, "vite");
158
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
160
var viteDir = Path.Combine(workspace.
Path
, "vite");
164
var apiDir = Path.Combine(workspace.
Path
, "api");
188
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
190
var appDir = Path.Combine(workspace.
Path
, "angular");
198
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
200
var dockerfilePath = Path.Combine(workspace.
Path
, "angular.Dockerfile");
214
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
216
var appDir = Path.Combine(workspace.
Path
, "vite");
224
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
226
var dockerfilePath = Path.Combine(workspace.
Path
, "vite.Dockerfile");
237
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
239
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
246
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
248
var dockerfilePath = Path.Combine(workspace.
Path
, "nextjs.Dockerfile");
258
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
260
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
267
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
269
var dockerfilePath = Path.Combine(workspace.
Path
, "nextjs.Dockerfile");
277
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
279
var appDir = Path.Combine(workspace.
Path
, "nuxt");
287
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
289
var dockerfilePath = Path.Combine(workspace.
Path
, "nuxt.Dockerfile");
297
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
299
var appDir = Path.Combine(workspace.
Path
, "nuxt");
307
await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
309
var dockerfilePath = Path.Combine(workspace.
Path
, "nuxt.Dockerfile");
319
File.WriteAllText(Path.Combine(workspace.
Path
, ".nvmrc"), "18.20.0");
321
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
322
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
325
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
327
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
339
File.WriteAllText(Path.Combine(workspace.
Path
, ".node-version"), "v21.5.0");
341
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
342
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
345
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
347
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
364
File.WriteAllText(Path.Combine(workspace.
Path
, ".tool-versions"), toolVersions);
366
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
367
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
370
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
372
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
390
File.WriteAllText(Path.Combine(workspace.
Path
, ".tool-versions"), toolVersions);
392
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
393
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
396
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
398
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
416
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), packageJson);
418
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
419
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
422
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
424
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
435
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
436
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
439
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
441
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
457
File.WriteAllText(Path.Combine(workspace.
Path
, ".nvmrc"), versionString);
459
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
460
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
463
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
465
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
474
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
).WithResourceCleanUp(true);
477
var nodeApp = builder.AddViteApp("vite", workspace.
Path
)
481
var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.
Path
);
487
var dockerfileContents = File.ReadAllText(Path.Combine(workspace.
Path
, "vite.Dockerfile"));
545
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
548
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
552
var viteApp = builder.AddViteApp("test-app", workspace.
Path
)
606
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
609
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
613
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
665
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
710
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
714
builder.AddViteApp("test-app", workspace.
Path
);
753
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
756
var viteConfigPath = Path.Combine(workspace.
Path
, "vite.config.js");
760
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
808
var repoRoot = Path.Combine(workspace.
Path
, "repo");
884
var repoRoot = Path.Combine(workspace.
Path
, "repo");
947
var repoRoot = Path.Combine(workspace.
Path
, "repo");
993
Directory.CreateDirectory(Path.Combine(workspace.
Path
, "node_modules"));
996
var viteConfigPath = Path.Combine(workspace.
Path
, configFileName);
1000
var viteApp = builder.AddViteApp("test-app", workspace.
Path
);
1048
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
1071
var nextDir = Path.Combine(workspace.
Path
, "nextjs");
1092
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)
27
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js");
39
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js")
51
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js")
64
var app = builder.AddNodeApp("app", workspace.
Path
, "server.js")
155
File.WriteAllText(Path.Combine(workspace.
Path
, "package.json"), "{}");
157
var app = builder.AddBunApp("app", workspace.
Path
, "server.ts");
168
File.WriteAllText(Path.Combine(workspace.
Path
, "deno.json"), "{}");
170
var app = builder.AddDenoApp("app", workspace.
Path
, "server.ts");
181
var app = builder.AddDenoApp("app", workspace.
Path
, "server.ts")
194
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 (312)
KubernetesDeployTests.cs (60)
307
workspace.
Path
,
348
workspace.
Path
,
388
workspace.
Path
,
429
workspace.
Path
,
469
workspace.
Path
,
504
workspace.
Path
,
540
workspace.
Path
,
564
workspace.
Path
,
589
workspace.
Path
,
796
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
830
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
844
var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "Chart.yaml"));
857
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
875
var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "Chart.yaml"));
888
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
897
var deploymentYaml = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "svc", "deployment.yaml"));
911
workspace.
Path
,
938
var outputPath = Path.Combine(workspace.
Path
, "env");
985
var outputPath = Path.Combine(workspace.
Path
, "env");
1005
var outputPath = Path.Combine(workspace.
Path
, "env");
1079
var outputPath = Path.Combine(workspace.
Path
, "env");
1130
workspace.
Path
,
1163
workspace.
Path
,
1236
var outputPath = Path.Combine(workspace.
Path
, "env");
1286
var outputPath = Path.Combine(workspace.
Path
, "env");
1309
workspace.
Path
,
1335
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1358
var serverSecretsTemplatePath = Path.Combine(workspace.
Path
, "templates", "server", "secrets.yaml");
1380
workspace.
Path
,
1410
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1437
var outputPath = Path.Combine(workspace.
Path
, "deploy");
1499
workspace.
Path
,
1525
workspace.
Path
, env, CancellationToken.None);
1527
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1553
workspace.
Path
,
1586
workspace.
Path
, env, CancellationToken.None);
1588
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1599
workspace.
Path
,
1631
workspace.
Path
, env, CancellationToken.None);
1633
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1644
workspace.
Path
,
1671
workspace.
Path
, env, CancellationToken.None);
1673
var overridePath = Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1674
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1676
await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "myapp", "config.yaml")),
1736
workspace.
Path
,
1751
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1773
workspace.
Path
,
1792
var configPath = Path.Combine(workspace.
Path
, "templates", resourceName, "config.yaml");
1810
workspace.
Path
,
1827
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1845
workspace.
Path
,
1862
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1881
workspace.
Path
,
1898
var valuesPath = Path.Combine(workspace.
Path
, "values.yaml");
1939
workspace.
Path
,
1970
workspace.
Path
,
2010
workspace.
Path
,
2055
workspace.
Path
,
2103
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 (166)
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);
517
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
543
var deployment = await File.ReadAllLinesAsync(Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml"));
566
await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")));
575
Assert.False(File.Exists(Path.Combine(workspace.
Path
, "templates/myapp/config.yaml")));
576
Assert.False(File.Exists(Path.Combine(workspace.
Path
, "templates/myapp/secrets.yaml")));
585
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
605
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
621
var deployment = await File.ReadAllLinesAsync(Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml"));
642
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
661
var deploymentPath = Path.Combine(workspace.
Path
, "templates/service/deployment.yaml");
673
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
719
var filePath = Path.Combine(workspace.
Path
, expectedFile);
739
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
774
Directory.GetFiles(Path.Combine(workspace.
Path
, "templates", "myapp"), "*.yaml"),
800
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
846
Directory.GetFiles(Path.Combine(workspace.
Path
, "templates", "myapp"), "*.yaml"),
878
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
902
var manifestPath = Path.Combine(workspace.
Path
, "templates/myapp/scaler.yaml");
933
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
952
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
978
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1005
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1077
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1094
var templatesFolder = Path.Combine(workspace.
Path
, "templates", "myapp");
1150
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1191
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1211
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1245
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1265
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1277
var dockerfilePath = Path.Combine(workspace.
Path
, "testcontainer.Dockerfile");
1288
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1352
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1362
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1401
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1411
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1436
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1446
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1529
var deploymentPath = Path.Combine(workspace.
Path
, "templates/myapp/deployment.yaml");
1594
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1630
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1653
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1684
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1685
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "api", "deployment.yaml")), "yaml")
1693
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1704
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
1715
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1731
var publishedValues = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml"));
1732
await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.
Path
, environment.Resource, CancellationToken.None);
1735
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml")
1743
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1753
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml");
1762
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1776
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1786
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1800
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1808
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1820
await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1821
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "worker", "deployment.yaml")), "yaml")
1822
.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "cache", "deployment.yaml")), "yaml");
1829
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1837
await Verify(File.ReadAllText(Path.Combine(workspace.
Path
, "Chart.yaml")), "yaml")
1838
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "values.yaml")), "yaml")
1839
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "deployment.yaml")), "yaml")
1840
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "service.yaml")), "yaml")
1841
.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.
Path
, "templates", "api", "config.yaml")), "yaml");
1848
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1874
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1892
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1918
var filePath = Path.Combine(workspace.
Path
, expectedFile);
1936
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1944
var servicePath = Path.Combine(workspace.
Path
, "templates/database/service.yaml");
1957
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
1980
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2007
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2032
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2055
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2075
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2093
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2120
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2140
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2166
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2192
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2216
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2252
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2275
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2295
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2321
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2341
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2382
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2402
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2433
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2453
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2495
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2515
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2531
var valuesContent = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "values.yaml"));
2541
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2580
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2600
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2634
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2664
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2691
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2710
var legacyPv = Path.Combine(workspace.
Path
, "templates", "service", "data-pv.yaml");
2725
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2740
var deploymentPath = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
2758
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2785
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2798
var legacyPvc = Path.Combine(workspace.
Path
, "templates", "service", "data-pvc.yaml");
2802
var deploymentPath = Path.Combine(workspace.
Path
, "templates", "service", "deployment.yaml");
2815
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2840
var filePath = Path.Combine(workspace.
Path
, expectedFile);
2858
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2880
var claimPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
2890
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2907
var omittedClaimPath = Path.Combine(workspace.
Path
, "templates", "omitted", "omitted.yaml");
2908
var emptyClaimPath = Path.Combine(workspace.
Path
, "templates", "empty", "empty.yaml");
2923
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2949
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", name, $"{name}.yaml"));
2962
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
2987
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", name, $"{name}.yaml"));
3000
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3023
var content = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, "templates", "data", "data.yaml"));
3031
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3049
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
3059
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3076
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
3096
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3127
var filePath = Path.Combine(workspace.
Path
, expectedFile);
3145
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3166
Assert.Equal("default-class", ReadStorageClassName(workspace.
Path
, "default"));
3167
Assert.Equal("explicit-class", ReadStorageClassName(workspace.
Path
, "explicit"));
3168
Assert.Null(ReadStorageClassName(workspace.
Path
, "omitted"));
3175
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3207
var filePath = Path.Combine(workspace.
Path
, expectedFile);
3229
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3245
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "service", "statefulset.yaml");
3251
var pvcPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
3269
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3300
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3315
var statefulSetPath = Path.Combine(workspace.
Path
, "templates", "api", "statefulset.yaml");
3362
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.
Path
);
3389
var pvcPath = Path.Combine(workspace.
Path
, "templates", "data", "data.yaml");
3401
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)
570
.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)
557
.WithTempAspireStore(workspace.
Path
)
Aspire.Hosting.Python.Tests (124)
AddPythonAppTests.cs (124)
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)
898
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
923
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
954
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
981
var pythonBuilder = builder.AddPythonApp("python-script", workspace.
Path
, "main.py");
1000
var pythonBuilder = builder.AddPythonModule("flask-app", workspace.
Path
, "flask");
1019
var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.
Path
, "pytest");
1040
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
1050
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1076
builder.AddPythonModule("pythonProject", workspace.
Path
, moduleName);
1084
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1110
builder.AddPythonExecutable("pythonProject", workspace.
Path
, executableName);
1118
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.
Path
));
1141
var pythonBuilder = builder.AddPythonModule("flask-app", workspace.
Path
, "flask")
1165
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py")
1187
var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.
Path
, "pytest")
1209
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py")
1239
var pythonBuilder = builder.AddPythonApp("python-app", workspace.
Path
, "main.py");
1286
var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
1305
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1311
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.
Path
));
1324
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1331
var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.
Path
));
1363
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1376
var manifest = await ManifestUtils.GetManifest(resource, workspace.
Path
);
1386
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1391
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1400
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1406
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1415
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1421
var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.
Path
);
1565
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.
Path
);
1576
var manifest = await ManifestUtils.GetManifestForModel(appModel, workspace.
Path
);
1739
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1741
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1783
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1785
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1823
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1825
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1858
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1860
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");
1927
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1929
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1931
var customWorkingDirectory = Path.Combine(workspace.
Path
, "custom");
1954
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1956
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
1958
var customWorkingDirectory = Path.Combine(workspace.
Path
, "custom");
1995
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
1997
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
2028
var appDirectory = Path.Combine(workspace.
Path
, "myapp");
2030
var virtualEnvironmentPath = Path.Combine(workspace.
Path
, ".venv");
2057
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2079
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2097
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py");
2350
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2354
var pyprojectPath = Path.Combine(workspace.
Path
, "pyproject.toml");
2357
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2384
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2388
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2391
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2419
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2423
var pyprojectPath = Path.Combine(workspace.
Path
, "pyproject.toml");
2425
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2428
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2449
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2452
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName);
2473
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2477
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2496
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2500
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2504
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2524
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2528
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2532
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2553
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2556
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2581
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2585
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2588
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2624
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2627
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2630
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2654
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2657
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2660
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2688
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2691
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2695
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2724
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2727
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2731
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2754
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2757
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2761
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2786
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2789
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2793
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2818
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2821
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2824
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2854
var scriptPath = Path.Combine(workspace.
Path
, "main.py");
2857
var pythonApp = builder.AddPythonApp("pythonProject", workspace.
Path
, "main.py")
2889
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
2908
var scriptPath = Path.Combine(workspace.
Path
, scriptName);
2911
var requirementsPath = Path.Combine(workspace.
Path
, "requirements.txt");
2914
builder.AddPythonApp("pythonProject", workspace.
Path
, scriptName)
Aspire.Hosting.Tests (447)
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)
449
["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 (4)
224
var app = DotnetFileAppProcess.WriteApp(workspace.
Path
, "legacy-lines.cs", """
254
var (executable, arguments) = await DotnetFileAppProcess.CreateInputRejectingProcessAsync(workspace.
Path
, exitCode.ToString(), TestContext.Current.CancellationToken);
295
var (executable, arguments) = await DotnetFileAppProcess.CreateInputRejectingProcessAsync(workspace.
Path
, "wait", TestContext.Current.CancellationToken);
348
workspace.
Path
, pipeName, holdStandardInput, hasStandardInput, exitCode, TestContext.Current.CancellationToken);
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 (24)
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");
221
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
222
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
240
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
241
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
313
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
314
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
334
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
335
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
356
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
357
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
380
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
381
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
413
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
414
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
435
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
436
var destinationArchive = Path.Combine(workspace.
Path
, "destination.tar");
459
var sourceArchive = Path.Combine(workspace.
Path
, "source.tar");
460
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
,
WithProcessCommandTests.cs (2)
1497
var (executable, arguments) = await DotnetFileAppProcess.CreateInputRejectingProcessAsync(workspace.
Path
, exitCode, TestContext.Current.CancellationToken);
1557
var appPath = DotnetFileAppProcess.WriteApp(workspace.
Path
, "blocked-input.cs", """
WithVolumeTests.cs (1)
112
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");