2194 references to Path
Aspire.Hosting.Azure.EntraId.Tests (42)
EntraIdApiProvisioningTests.cs (5)
766using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 782workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 786await 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)
216using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 249workspace.Path, app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 253await 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)
799using var first = entra.Resource.GetBicepTemplateFile(workspace.Path); 801using var second = entra.Resource.GetBicepTemplateFile(workspace.Path); 864var manifest = await ManifestUtils.GetManifest(entra.Resource, workspace.Path); 874using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 887workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 891await 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"); 899using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 910workspace.Path, 918await 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"); 926using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 935workspace.Path, 946await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep"); 953using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 968workspace.Path, 976await 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"); 984using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 999workspace.Path, 1007await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "web", "web.bicep")), "bicep"); 1014using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 1040workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 1044var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1045var apiBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "entra-api", "entra-api.bicep")); 1046var webBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "entra-web", "entra-web.bicep")); 1047var consumerBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "consumer", "consumer.bicep")); 1048Assert.Equal(new[] { "consumer", "entra-api", "entra-web" }, Directory.GetDirectories(workspace.Path).Select(Path.GetFileName).Order()); 1664DistributedApplicationOperation.Publish, outputHelper, workspace.Path, step: WellKnownPipelineSteps.Deploy);
EntraIdStarterScenarioPublishTests.cs (3)
27var apiProject = CreateProject(workspace.Path, "aspire-entra.ApiService", 5101, 7101); 28var webProject = CreateProject(workspace.Path, "aspire-entra.Web", 5102, 7102); 29var outputPath = Path.Combine(workspace.Path, "out");
Aspire.Hosting.Azure.Kubernetes.Tests (36)
AzureKubernetesEnvironmentExtensionsTests.cs (30)
608var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 609var clusterBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks", "aks.bicep")); 610var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "cluster-roles", "cluster-roles.bicep")); 818var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 819var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks", "aks.bicep")); 820var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, roles.Name, $"{roles.Name}.bicep")); 821var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "registry", "registry.bicep")); 822var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-control-plane-identity", "aks-control-plane-identity.bicep")); 823var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-kubelet-identity", "aks-kubelet-identity.bicep")); 824var 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")); 1033var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1034var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks", "aks.bicep")); 1035var roleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, roles.Name, $"{roles.Name}.bicep")); 1036var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "registry", "registry.bicep")); 1131var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1132var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks", "aks.bicep")); 1133var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, operatorRole.Name, $"{operatorRole.Name}.bicep")); 1134var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-acr", "aks-acr.bicep")); 1135var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-control-plane-identity", "aks-control-plane-identity.bicep")); 1136var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-kubelet-identity", "aks-kubelet-identity.bicep")); 1137var registryRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, registryRole.Name, $"{registryRole.Name}.bicep")); 1221var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1222var registryBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "registry", "registry.bicep")); 1223var registryRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, registryRole.Name, $"{registryRole.Name}.bicep")); 1224var networkBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "network", "network.bicep")); 1225var networkRoleBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, networkRole.Name, $"{networkRole.Name}.bicep")); 1226var aksBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks", "aks.bicep")); 1227var controlPlaneBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-control-plane-identity", "aks-control-plane-identity.bicep")); 1228var kubeletBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "aks-kubelet-identity", "aks-kubelet-identity.bicep")); 1230var operatorBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, operatorRoleName, $"{operatorRoleName}.bicep"));
AzureKubernetesFoundryReferenceTests.cs (1)
77var valuesPath = Directory.EnumerateFiles(workspace.Path, "values.yaml", SearchOption.AllDirectories).Single();
AzureKubernetesIngressTests.cs (1)
32var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml");
AzureKubernetesPersistentVolumeTests.cs (3)
40var claimPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 92var claimPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 96var 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)
247container.WithBindMount(workspace.Path, dbPath); 271return Directory.GetFileSystemEntries(workspace.Path, searchPattern, enumerationOptions);
Aspire.Hosting.Azure.Tests (104)
AzureApiManagementTests.cs (10)
444var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 480var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 938var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 972var documentPath = Path.Combine(workspace.Path, "deploy-only.json"); 996var documentPath = Path.Combine(workspace.Path, "deploy-only.json"); 1023var documentPath = Path.Combine(workspace.Path, "generated.json"); 1049var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 1143var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 2140workspace.Path); 2153var mainBicepPath = Path.Combine(workspace.Path, "main.bicep");
AzureAppServiceTests.cs (10)
240var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path, step: "validate-appservice-config-env"); 281var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path, step: "validate-appservice-config-env"); 313var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "validate-appservice-config-env"); 616var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 632var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 636var envBicepPath = Path.Combine(workspace.Path, "env", "env.bicep"); 640var apiBicepPath = Path.Combine(workspace.Path, "api", "api.bicep"); 812var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path, step: "publish-manifest"); 833Path.Combine(workspace.Path, "aspire-manifest.json"), 842var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path);
AzureBicepResourceTests.cs (4)
257var bicepFilePath = Path.Combine(workspace.Path, bicepFileName); 264var outputDir = Path.Combine(workspace.Path, "output"); 282var bicepFilePath = Path.Combine(workspace.Path, bicepFileName); 306var outputDir = Path.Combine(workspace.Path, "output");
AzureContainerAppEnvironmentExtensionsTests.cs (5)
553var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 566var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 570var envBicepPath = Path.Combine(workspace.Path, "env", "env.bicep"); 587var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 607Assert.True(File.Exists(Path.Combine(workspace.Path, "main.bicep")));
AzureContainerAppExpressEndpointTests.cs (2)
232using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path); 267Assert.True(File.Exists(Path.Combine(workspace.Path, "main.bicep")));
AzureContainerAppsTests.cs (11)
2019var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputHelper, workspace.Path, step: "publish-manifest"); 2037await VerifyFile(Path.Combine(workspace.Path, "aspire-manifest.json")); 2141workspace.Path, 2171workspace.Path, 2291workspace.Path, 2317workspace.Path, 2346workspace.Path, 2375workspace.Path, 2835File.WriteAllText(Path.Combine(workspace.Path, "Dockerfile"), "FROM alpine"); 2837builder.AddDockerfile("with-bind-mount", workspace.Path) 2838.WithBindMount(workspace.Path, "/app/data");
AzureEnvironmentResourceTests.cs (24)
54using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 91using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 303workspace.Path); 318var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep")); 326using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 363var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep")); 372using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 379var outputPath = Path.Combine(workspace.Path, "exclude-main"); 401using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 406var context = await CreatePublishingContextAsync(app, workspace.Path); 417Assert.True(File.Exists(Path.Combine(workspace.Path, resourceName, $"{resourceName}.bicep"))); 418var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 426using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 433var outputPath = Path.Combine(workspace.Path, "write-main"); 458using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 472var outputPath = Path.Combine(workspace.Path, "provider"); 521output, workspace.Path); 535var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 540var includedStorageBicepPath = Path.Combine(workspace.Path, "included-storage", "included-storage.bicep"); 544var excludedStorageBicepPath = Path.Combine(workspace.Path, "excluded-storage", "excluded-storage.bicep"); 554var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, output, workspace.Path); 566var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 579remoteInvokeOptions.StartInfo.WorkingDirectory = workspace.Path; 580using var handle = RemoteExecutor.Invoke(RunTest, workspace.Path, remoteInvokeOptions);
AzureFrontDoorAppServicePrivateLinkTests.cs (4)
21DistributedApplicationOperation.Publish, testOutputHelper, workspace.Path); 31await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep"); 32Assert.True(File.Exists(Path.Combine(workspace.Path, "api", "api.bicep"))); 33Assert.True(File.Exists(Path.Combine(workspace.Path, "frontdoor", "frontdoor.bicep")));
AzureFunctionsTests.cs (30)
307var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript); 330var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript); 355var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript) 379builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript); 405var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript) 432var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.JavaScript) 458builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript); 470using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 471var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.Path, includePackageLock); 475var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.Path); 504var dockerfilePath = Path.Combine(tempDir.Path, "funcapp.Dockerfile"); 524using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 525var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.Path, includePackageLock); 529await ManifestUtils.GetManifest(funcApp.Resource, tempDir.Path); 543var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "funcapp.Dockerfile")); 556using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 557var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.Path, includePackageLock: true); 562var manifest = await ManifestUtils.GetManifest(funcApp.Resource, tempDir.Path); 566Assert.False(File.Exists(Path.Combine(tempDir.Path, "funcapp.Dockerfile"))); 576using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 581var appDirectory = CreateNodeFunctionsAppDirectory(tempDir.Path, includePackageLock: true); 600var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.TypeScript); 614var funcApp = builder.AddAzureFunctionsApp("funcapp", tempDir.Path, AzureFunctionsLanguage.JavaScript); 965var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj"); 990var projectPath = Path.Combine(workspace.Path, "MyFunctions.csproj"); 1012var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj"); 1042var projectPath1 = Path.Combine(workspace.Path, "Functions1.csproj"); 1043var projectPath2 = Path.Combine(workspace.Path, "Functions2.csproj"); 1064var projectPath = Path.Combine(workspace.Path, "Functions.csproj"); 1094var projectPath = Path.Combine(workspace.Path, "Functions.csproj");
AzureSandboxesTests.cs (2)
211workspace.Path); 218var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
JavaScriptPublishValidationTests.cs (2)
33builder.AddJavaScriptApp("js", workspace.Path) 37builder.AddNextJsApp("nextjs", workspace.Path).WithExternalHttpEndpoints();
Aspire.Hosting.Docker.Tests (147)
DockerComposePublisherTests.cs (106)
31using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-env"); 63await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")), "env") 73using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 92await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml")), "yaml").UseParameters(longNames); 105using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 128using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 148using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-env"); 170await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")), "env").UseParameters(overridden); 177using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-env"); 199await 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"); 210var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 285var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 286var envPath = Path.Combine(workspace.Path, ".env"); 298var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 308var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml")); 324var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 346var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 347var envPath = Path.Combine(workspace.Path, ".env"); 359var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 369var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml")); 370var environment = File.ReadAllText(Path.Combine(workspace.Path, ".env")); 379using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path) 394var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 404using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "publish-docker-compose") 423var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 432var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 474var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 476var envPath = Path.Combine(workspace.Path, ".env"); 487using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 505var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 513var envFilePath = Path.Combine(workspace.Path, ".env"); 517var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 544var envFilePath = Path.Combine(workspace.Path, ".env"); 548var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 585var envFilePath = Path.Combine(workspace.Path, ".env"); 588var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 604var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 618var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 630var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 644var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 659var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 676var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 691var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 707var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 722var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 735var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 748var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 769var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 780var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 793var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 808var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 821var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 837var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 851var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 865var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 880var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 893var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 912var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 924var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 937var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 949var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, workspace.Path); 961var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 970var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 988var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 998var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1017var envFilePath = Path.Combine(workspace.Path, ".env.Staging"); 1030var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1051var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1061var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1073var envFilePath = Path.Combine(workspace.Path, ".env.Production"); 1094var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1107var envFilePath = Path.Combine(workspace.Path, ".env.Staging"); 1124var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1140var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml")); 1141var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1151var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1173var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1182var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 1199var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1210var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1224var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1225var envPath = Path.Combine(workspace.Path, ".env"); 1238var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1251var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1267var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1282var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1283var envPath = Path.Combine(workspace.Path, ".env"); 1295var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1310var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1321var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1346var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1347var envPath = Path.Combine(workspace.Path, ".env"); 1360var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1394var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1395var envPath = Path.Combine(workspace.Path, ".env"); 1414var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1428var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1429var envPath = Path.Combine(workspace.Path, ".env"); 1441var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1472var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1482var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1506var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1516var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1534var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
DockerComposeTests.cs (25)
51using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 63var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 71using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 85var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 152var outputPath = Path.Combine(workspace.Path, "output"); 179var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 191var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 203var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 225var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 239var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 264var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 324var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: step); 351var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 378var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Diagnostics); 427var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: step); 693var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "push-servicea"); 724var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "push-servicea"); 761var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Diagnostics); 809var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Diagnostics); 969["OutputPath"] = workspace.Path, 971["ComposeFilePath"] = Path.Combine(workspace.Path, "docker-compose.yaml") 975var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Destroy); 1012var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Destroy); 1044var deployBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Deploy); 1068var destroyBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Destroy);
EnvFileTests.cs (16)
16var envFilePath = Path.Combine(workspace.Path, ".env"); 50var envFilePath = Path.Combine(workspace.Path, ".env"); 70var envFilePath = Path.Combine(workspace.Path, ".env"); 88var envFilePath = Path.Combine(workspace.Path, ".env"); 108var envFilePath = Path.Combine(workspace.Path, ".env"); 123var envFilePath = Path.Combine(workspace.Path, ".env"); 145var envFilePath = Path.Combine(workspace.Path, ".env"); 165var envFilePath = Path.Combine(workspace.Path, ".env"); 185var envFilePath = Path.Combine(workspace.Path, ".env"); 212var envFilePath = Path.Combine(workspace.Path, ".env"); 228var envFilePath = Path.Combine(workspace.Path, ".env"); 254var envFilePath = Path.Combine(workspace.Path, ".env"); 280var envFilePath = Path.Combine(workspace.Path, ".env"); 320var envFilePath = Path.Combine(workspace.Path, ".env"); 345var envFilePath = Path.Combine(workspace.Path, ".env"); 362var envFilePath = Path.Combine(workspace.Path, ".env");
Aspire.Hosting.Dotnet.Tests (377)
DotnetProjectBuildArtifactManagerTests.cs (7)
18var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build"); 45var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build"); 78var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build"); 114var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build"); 139var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build"); 153var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build"); 168var buildDirectory = Path.Combine(workspace.Path, ".aspire", "build");
DotnetProjectBuildCoordinatorTests.cs (275)
54options => options.ProjectDirectory = workspace.Path, 116options => options.ProjectDirectory = workspace.Path, 119var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 147var globalJsonPath = Path.Combine(workspace.Path, "global.json"); 152options => options.ProjectDirectory = workspace.Path, 161var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 208options => options.ProjectDirectory = workspace.Path, 218var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 219var firstDotnetPath = Path.Combine(workspace.Path, "first-sdk"); 220var secondDotnetPath = Path.Combine(workspace.Path, "second-sdk"); 280options => options.ProjectDirectory = workspace.Path, 284var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 302var sharedProject = CreateSharedProject(workspace.Path); 303var projectPath = CreateConsoleProject(workspace.Path, "Api", sharedProject); 305options => options.ProjectDirectory = workspace.Path, 359options => options.ProjectDirectory = workspace.Path, 371var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 393options => options.ProjectDirectory = workspace.Path, 402var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 426options => options.ProjectDirectory = workspace.Path, 438var sharedProject = CreateSharedProject(workspace.Path); 439var projectPath = CreateConsoleProject(workspace.Path, "Api", sharedProject); 440var filePath = CreateFileApp(workspace.Path, "Worker", sharedProject); 482options => options.ProjectDirectory = workspace.Path, 491var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 512options => options.ProjectDirectory = workspace.Path, 521var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 544options => options.ProjectDirectory = workspace.Path, 549var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 566options => options.ProjectDirectory = workspace.Path, 575var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 593options => options.ProjectDirectory = workspace.Path, 595var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 637var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 689var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 774options => options.ProjectDirectory = workspace.Path, 777var filePath = Path.Combine(workspace.Path, "worker.cs"); 784Path.Combine(workspace.Path, "artifacts"); 806var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 833options => options.ProjectDirectory = workspace.Path, 836var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 837var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "worker")); 922options => options.ProjectDirectory = workspace.Path, 924var sharedProject = CreateSharedProject(workspace.Path); 925var firstPath = CreateFileApp(workspace.Path, "First", sharedProject); 926var secondPath = CreateFileApp(workspace.Path, "Second", sharedProject); 927var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt"); 928var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 997var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 1097options => options.ProjectDirectory = workspace.Path, 1099var firstProject = CreateProject(workspace.Path, "First's Project", "First.csproj"); 1100var secondProject = CreateProject(workspace.Path, "Second", "Second.csproj"); 1129var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1130var customTargetsPath = Path.Combine(workspace.Path, "CustomNuGet.targets"); 1140workspace.Path, 1141Path.Combine(workspace.Path, "obj", ".aspire", "build"), 1145workspace.Path, 1153WorkingDirectory = workspace.Path, 1184var projectPath = CreateProjectFile(workspace.Path, "Service", """ 1193workspace.Path, 1194Path.Combine(workspace.Path, "obj", ".aspire", "build"), 1198workspace.Path, 1204var missingTargetsPath = Path.Combine(workspace.Path, "missing", "NuGet.targets"); 1207WorkingDirectory = workspace.Path, 1240using var builder = TestDistributedApplicationBuilder.Create(options => options.ProjectDirectory = workspace.Path, outputHelper); 1241var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj"); 1243var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1259var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1260var buildDirectory = Path.Combine(workspace.Path, "obj", ".aspire", "build"); 1261using var unified = new DotnetProjectBuildResource("unified", workspace.Path, buildDirectory, TimeProvider.System); 1262using var individual = new DotnetProjectBuildResource("individual", workspace.Path, buildDirectory, TimeProvider.System); 1263unified.ConfigureTraversalBuild([projectPath], workspace.Path, buildConfiguration: null, restoreProjectsIndividually: false); 1264individual.ConfigureTraversalBuild([projectPath], workspace.Path, buildConfiguration: null, restoreProjectsIndividually: true); 1282options => options.ProjectDirectory = workspace.Path, 1284var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1381workspace.Path, 1382Path.Combine(workspace.Path, "obj", ".aspire", "build"), 1386workspace.Path, 1433var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 1468var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 1527options => options.ProjectDirectory = workspace.Path, 1530var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1615options => options.ProjectDirectory = workspace.Path, 1617var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1618var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1638options => options.ProjectDirectory = workspace.Path, 1640var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1641var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1661options => options.ProjectDirectory = workspace.Path, 1663var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1664var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1690options => options.ProjectDirectory = workspace.Path, 1692var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1693var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1712options => options.ProjectDirectory = workspace.Path, 1714var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1715var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1738options => options.ProjectDirectory = workspace.Path, 1756var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1776options => options.ProjectDirectory = workspace.Path, 1778var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1805options => options.ProjectDirectory = workspace.Path, 1808var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1809var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1864options => options.ProjectDirectory = workspace.Path, 1866var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1900options => options.ProjectDirectory = workspace.Path, 1902var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1939options => options.ProjectDirectory = workspace.Path, 1942var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1990options => options.ProjectDirectory = workspace.Path, 1993var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2060var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 2108options => options.ProjectDirectory = workspace.Path, 2110var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2154options => options.ProjectDirectory = workspace.Path, 2157var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2210options => options.ProjectDirectory = workspace.Path, 2213var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2268options => options.ProjectDirectory = workspace.Path, 2271var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2329var projectPath = CreateBrokenProject(workspace.Path, "COORDINATED_BUILD_MARKER"); 2336options.ProjectDirectory = workspace.Path; 2379options => options.ProjectDirectory = workspace.Path, 2381var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2431options => options.ProjectDirectory = workspace.Path, 2433var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2465options => options.ProjectDirectory = workspace.Path, 2467var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2505options => options.ProjectDirectory = workspace.Path, 2507var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2576options => options.ProjectDirectory = workspace.Path, 2578var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 2579var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2606options => options.ProjectDirectory = workspace.Path, 2608var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2629options => options.ProjectDirectory = workspace.Path, 2631var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2651options => options.ProjectDirectory = workspace.Path, 2653var appPath = Path.Combine(workspace.Path, "app.cs"); 2671options => options.ProjectDirectory = workspace.Path, 2673var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2712options => options.ProjectDirectory = workspace.Path, 2714var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2842options => options.ProjectDirectory = workspace.Path, 2844var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2923options => options.ProjectDirectory = workspace.Path, 2925var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 2974options => options.ProjectDirectory = workspace.Path, 2976var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 3044options => options.ProjectDirectory = workspace.Path, 3046var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 3073options => options.ProjectDirectory = workspace.Path, 3075var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 3076var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 3114var workspaceRoot = PathNormalizer.ResolvePathCasing(workspace.Path); 3170options => options.ProjectDirectory = workspace.Path, 3172var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 3174var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-1")).FullName; 3175var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-2")).FullName; 3220options => options.ProjectDirectory = workspace.Path, 3222var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName; 3226var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName; 3245options => options.ProjectDirectory = workspace.Path, 3248Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName, 3252var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "foreign")).FullName; 3280options => options.ProjectDirectory = workspace.Path, 3282var activePath = CreateProject(workspace.Path, "Active", "Active.csproj"); 3283var removedPath = CreateProject(workspace.Path, "Removed", "Removed.csproj"); 3304options => options.ProjectDirectory = workspace.Path, 3306var activePath = CreateProject(workspace.Path, "Active", "Active.csproj"); 3307var replacedPath = CreateProject(workspace.Path, "Replaced", "Replaced.csproj"); 3314@event.Model.Resources[index] = new ExecutableResource(replaced.Resource.Name, "dotnet", workspace.Path); 3330options => options.ProjectDirectory = workspace.Path, 3332var projectPath = CreateProject(workspace.Path, "Project", "Project.csproj"); 3333var filePath = Path.Combine(workspace.Path, "worker.cs"); 3380options => options.ProjectDirectory = workspace.Path, 3382var firstPath = CreateProject(workspace.Path, "First", "First.csproj"); 3383var secondPath = CreateProject(workspace.Path, "Second", "Second.csproj"); 3427options => options.ProjectDirectory = workspace.Path, 3429var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "Physical")); 3439var linkPath = Path.Combine(workspace.Path, "Alias"); 3450var otherProjectPath = CreateProject(workspace.Path, "Other", "Other.csproj"); 3477options => options.ProjectDirectory = workspace.Path, 3479var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 3501options => options.ProjectDirectory = workspace.Path, 3503var removedProjectPath = CreateProject(workspace.Path, "Removed", "Removed.csproj"); 3510var activeProjectPath = CreateProject(workspace.Path, "Active", "Active.csproj"); 3531options => options.ProjectDirectory = workspace.Path, 3533var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 3561options => options.ProjectDirectory = workspace.Path, 3563var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 3594options => options.ProjectDirectory = workspace.Path, 3596var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 3627options => options.ProjectDirectory = workspace.Path, 3629var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 3652options => options.ProjectDirectory = workspace.Path, 3654var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 3655var removedPath = CreateProject(workspace.Path, "Removed", "Removed.csproj"); 3656var missingPath = Path.Combine(workspace.Path, "Missing", "Missing.csproj"); 3679options => options.ProjectDirectory = workspace.Path, 3681var firstPath = CreateProject(workspace.Path, "First", "First.csproj"); 3682var secondPath = CreateProject(workspace.Path, "Second", "Second.csproj"); 3738options => options.ProjectDirectory = workspace.Path, 3740var projectPath = CreateProject(workspace.Path, "Service", "App.csproj"); 3741var linkDirectory = Path.Combine(workspace.Path, "ServiceAlias"); 3780workspace.Path, 3781Path.Combine(workspace.Path, "obj", ".aspire", "build"), 3783buildResource.AddProject(CreateProject(workspace.Path, "Api", "Api.csproj")); 3830var sharedProject = CreateSharedProject(workspace.Path); 3831var apiProject = CreateConsoleProject(workspace.Path, "Api", sharedProject, extension); 3832var workerProject = CreateConsoleProject(workspace.Path, "Worker", sharedProject, workerExtension); 3833var escapedDirectory = Path.Combine(workspace.Path, "Api's Project 100% (test)"); 3836var apiSentinel = Path.Combine(workspace.Path, "api-ran.txt"); 3837var workerSentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 3840options => options.ProjectDirectory = workspace.Path, 3891var sharedProject = CreateSharedProject(workspace.Path); 3892var projectPath = CreateConsoleProject(workspace.Path, "Api", sharedProject); 3900var sentinels = Directory.CreateDirectory(Path.Combine(workspace.Path, "instances")).FullName; 3902options => options.ProjectDirectory = workspace.Path, 3957var projectPath = CreateBrokenProject(workspace.Path, "REPLICAS_BUILD_FAILED"); 3959options => options.ProjectDirectory = workspace.Path, 3991var firstProject = CreateSentinelProject(workspace.Path, "First", """ 3996var secondProject = CreateSentinelProject(workspace.Path, "Second", """ 4004var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt"); 4005var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 4008options => options.ProjectDirectory = workspace.Path, 4076var project = CreateSentinelProject(workspace.Path, "Worker", $$""" 4082var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 4085options => options.ProjectDirectory = workspace.Path, 4117var brokenProject = CreateBrokenProject(workspace.Path, "FIRST_BUILD_FAILED"); 4118var secondBuildMarker = Path.Combine(workspace.Path, "second-built.txt"); 4119var secondProject = CreateSentinelProject(workspace.Path, "Second", $$""" 4124var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 4127options => options.ProjectDirectory = workspace.Path, 4172var validProject = CreateProjectFile(workspace.Path, "Valid", """ 4183var sentinelPath = Path.Combine(workspace.Path, "valid-ran.txt"); 4184var missingProject = Path.Combine(workspace.Path, "Missing", "Missing.csproj"); 4187options => options.ProjectDirectory = workspace.Path, 4229options => options.ProjectDirectory = workspace.Path, 4237var missingPath = Path.Combine(workspace.Path, "Missing", $"Missing.{extension}"); 4265var projectPath = CreateProjectFile(workspace.Path, "EnvironmentBuild", $$""" 4291var sentinelPath = Path.Combine(workspace.Path, "environment-build-ran.txt"); 4296options => options.ProjectDirectory = workspace.Path, 4387var projectPath = CreateProjectWithBuildProducedRunPropertiesSentinel(workspace.Path); 4390options => options.ProjectDirectory = workspace.Path, 4446var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4447var filePath = Path.Combine(workspace.Path, "worker.cs"); 4450options => options.ProjectDirectory = workspace.Path, outputHelper); 4479var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4481options => options.ProjectDirectory = workspace.Path, outputHelper); 4551var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4553options => options.ProjectDirectory = workspace.Path, outputHelper); 4595var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4597options => options.ProjectDirectory = workspace.Path, outputHelper); 4630var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4632options => options.ProjectDirectory = workspace.Path, outputHelper); 4679var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4680var filePath = Path.Combine(workspace.Path, "worker.cs"); 4683options => options.ProjectDirectory = workspace.Path, outputHelper); 4713var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 4714var filePath = Path.Combine(workspace.Path, "worker.cs"); 4717options => options.ProjectDirectory = workspace.Path, 4776var projectPath = CreateProject(workspace.Path, "EnvironmentBuild", "EnvironmentBuild.csproj"); 4779options => options.ProjectDirectory = workspace.Path, 4785Path.Combine(workspace.Path, "missing-dotnet"); 4820var brokenProject = CreateBrokenProject(workspace.Path, buildLogMarker); 4821var fileApp = Path.Combine(workspace.Path, "worker.cs"); 4822var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 4832options => options.ProjectDirectory = workspace.Path, 4883var releaseBuild = Path.Combine(workspace.Path, "release-build"); 4884var brokenProject = CreateGatedBrokenProject(workspace.Path, releaseBuild); 4885var fileApp = Path.Combine(workspace.Path, "worker.cs"); 4886var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 4896options => options.ProjectDirectory = workspace.Path,
DotnetProjectFacadeTests.cs (1)
160var path = Path.Combine(workspace.Path, "Service.vbproj");
DotnetProjectLaunchProfileTests.cs (9)
27var path = CreateProject(workspace.Path, ".VBPROJ"); 78var path = CreateProject(workspace.Path, ".vbproj"); 115var path = CreateProject(workspace.Path, ".vbproj"); 150var path = CreateProject(workspace.Path, ".vbproj"); 167var path = CreateProject(workspace.Path, ".vbproj"); 199var path = CreateProject(workspace.Path, extension); 225var path = CreateProject(workspace.Path, extension); 247var path = CreateProject(workspace.Path, ".vbproj"); 264var path = CreateProject(workspace.Path, ".vbproj");
DotnetProjectOptionsTests.cs (3)
26var projectPath = await CreateProjectAsync(workspace.Path, includeKestrel: false); 50var projectPath = await CreateProjectAsync(workspace.Path, includeKestrel: false); 76var projectPath = await CreateProjectAsync(workspace.Path, includeKestrel: true);
DotnetProjectPathTests.cs (19)
24var projectPath = Path.Combine(workspace.Path, $"Service{extension}"); 27options => options.ProjectDirectory = workspace.Path, 39Assert.Equal(workspace.Path, resource.Resource.WorkingDirectory); 63options => options.ProjectDirectory = workspace.Path, 89var path = Path.Combine(workspace.Path, "Service.fsproj"); 95options => options.ProjectDirectory = workspace.Path, 101includeProject ? path : workspace.Path, 127options => options.ProjectDirectory = workspace.Path, 158var path = Path.Combine(workspace.Path, fileName); 164options => options.ProjectDirectory = workspace.Path, 196options => options.ProjectDirectory = workspace.Path, 216var path = Path.Combine(workspace.Path, $"Service{extension}"); 221var legacy = builder.AddProject("legacy", workspace.Path, options => options.ExcludeLaunchProfile = true); 223var modern = builder.AddDotnetProject("modern", workspace.Path, options => options.ExcludeLaunchProfile = true); 225Assert.Equal(workspace.Path, legacy.Resource.GetProjectMetadata().ProjectPath); 237var path = Path.Combine(workspace.Path, $"Service{extension}"); 287var path = Path.Combine(workspace.Path, fileName); 308var path = Path.Combine(workspace.Path, "MissingDirectory"); 327var 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"), 176var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 178var expectedPath = Path.GetRelativePath(workspace.Path, metadata.ProjectPath).Replace('\\', '/'); 192var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 209var resource = new DotnetProjectResource("svc", workspace.Path); 211() => ManifestUtils.GetManifest(resource, workspace.Path)); 223var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 231var manifest = await ManifestUtils.GetManifestOrNull(resource.Resource, workspace.Path); 239var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 247var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.Path); 255var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 256await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch"); 265var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.Path); 295var appPath = Path.Combine(workspace.Path, "app.cs"); 302var archivePath = Path.Combine(workspace.Path, "app.tar.gz"); 332var sentinelDockerfilePath = Path.Combine(workspace.Path, "Dockerfile.sentinel"); 333await File.WriteAllTextAsync(Path.Combine(workspace.Path, "sentinel.txt"), marker, cancellation.Token); 336workspace.Path, 401var projectPath = Path.Combine(workspace.Path, "Project.csproj"); 408context.OutputPath = Path.Combine(workspace.Path, "project.tar"); 427var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project")); 429var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")); 453var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 471var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "AmbiguousService")); 540var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 674var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 744var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 1127var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project")); 1154var archivePath = Path.Combine(workspace.Path, "project.tar.gz");
DotnetProjectRunPropertiesResolverTests.cs (6)
21var projectPath = Path.Combine(workspace.Path, "Broken.csproj"); 40workspace.Path, 57var projectPath = Path.Combine(workspace.Path, "Warning.csproj"); 77workspace.Path, 86Path.Combine(workspace.Path, "bin"), 87Path.Combine(workspace.Path, "bin", "app.dll"),
MsTestCollectorTests.cs (9)
48File.WriteAllText(Path.Combine(workspace.Path, "runner reports", "results.trx"), 71var path = Path.Combine(workspace.Path, "runner reports", "results.trx"); 115File.WriteAllText(Path.Combine(workspace.Path, "runner reports", "results.trx"), failure == "malformed" 169var source = Path.Combine(workspace.Path, "runner reports"); 207var target = Path.Combine(workspace.Path, "outside.trx"); 220File.CreateSymbolicLink(Path.Combine(workspace.Path, "runner reports", "results.trx"), target); 237File.Copy(Path.Combine(MSBuildUtils.GetRepoRoot(), "NuGet.config"), Path.Combine(workspace.Path, "NuGet.config")); 313builder.Configuration[KnownConfigNames.TestOutputPath] = Path.Combine(workspace.Path, "test output"); 320var path = Path.Combine(workspace.Path, "tests.csproj");
MsTestResourceTests.cs (15)
46options => options.ProjectDirectory = workspace.Path, outputHelper); 49builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports with spaces"); 51var resource = builder.AddMsTest("tests", Path.GetRelativePath(workspace.Path, path), 104var path = Path.Combine(workspace.Path, "tests.csproj"); 107builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 123var path = Path.Combine(workspace.Path, "tests.csproj"); 126builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 127var api = builder.AddResource(new DotnetProjectResource("api", workspace.Path)).WithHttpEndpoint(); 142var path = Path.Combine(workspace.Path, "tests.csproj"); 145builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 174var path = Path.Combine(workspace.Path, "tests.csproj"); 177builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 195Assert.Throws<ArgumentException>(() => builder.AddMsTest("tests", workspace.Path)); 196Assert.Throws<FileNotFoundException>(() => builder.AddMsTest("tests", Path.Combine(workspace.Path, "missing.csproj"))); 197var path = Path.Combine(workspace.Path, "tests.csproj");
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFOutputDiffingTests.cs (4)
26using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "inspect"); 76var artifact = Path.Combine(workspace.Path, "efmigrations", bundle ? "migrations" : "migrations.sql"); 79using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 118Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message);
Aspire.Hosting.Go.Tests (24)
AddGoAppTests.cs (8)
1014using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1019var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 1074using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1078var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 1087using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1092var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 1101using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1106var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path);
GoRunDebuggingTests.cs (5)
354File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/debugflags\n\ngo 1.18\n"); 355File.WriteAllText(Path.Combine(workspace.Path, "main.go"), """ 421File.WriteAllText(Path.Combine(workspace.Path, "tag.go"), """ 431var go = builder.AddGoApp("api", workspace.Path) 436var goEnvironment = Path.Combine(workspace.Path, "go.env");
GoVersionDetectorTests.cs (11)
13var version = GoVersionDetector.Detect(workspace.Path); 22File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n\ngo 1.23\n"); 24var version = GoVersionDetector.Detect(workspace.Path); 33File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n\ngo 1.23.4\n"); 35var version = GoVersionDetector.Detect(workspace.Path); 44File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), 47var version = GoVersionDetector.Detect(workspace.Path); 57File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), 60var version = GoVersionDetector.Detect(workspace.Path); 69File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n"); 71var version = GoVersionDetector.Detect(workspace.Path);
Aspire.Hosting.Java.Tests (4)
AddJavaAppPublishTests.cs (4)
46Directory.CreateDirectory(Path.Combine(workspace.Path, "build", "libs")); 50await File.WriteAllTextAsync(Path.Combine(workspace.Path, "build", "libs", "reports service.jar"), ""); 52var destination = Path.Combine(workspace.Path, "app.jar"); 58WorkingDirectory = workspace.Path,
Aspire.Hosting.JavaScript.Tests (489)
AddBunAppTests.cs (31)
32using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 34var appDir = Path.Combine(workspace.Path, "js"); 44await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 46var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 60using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 62var appDir = Path.Combine(workspace.Path, "js"); 71await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 73await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"))); 80using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 82var appDir = Path.Combine(workspace.Path, "js"); 88await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 93var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 111using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 113var appDir = Path.Combine(workspace.Path, "js"); 119await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 121var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 131await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 143File.WriteAllText(Path.Combine(workspace.Path, "server.ts"), "console.log('hi');"); 147builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 165File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 169builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 217var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 309var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 322var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 334var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts") 349File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 351var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts") 364var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 371Assert.Equal(Path.GetFullPath("server.ts", workspace.Path), launchConfig.ScriptPath); 382File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 384var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts")
AddDenoAppTests.cs (221)
57using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 59var appDir = Path.Combine(workspace.Path, "js"); 69await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 71var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 85using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 87var appDir = Path.Combine(workspace.Path, "js"); 96await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 98var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 108using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 110var appDir = Path.Combine(workspace.Path, "js"); 116await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 121var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 140using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 142var appDir = Path.Combine(workspace.Path, "js"); 147await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 149var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 175using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 177var appDir = Path.Combine(workspace.Path, "js"); 184await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 186var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 195using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 197var appDir = Path.Combine(workspace.Path, "js"); 207await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 209var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 219using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 221var appDir = Path.Combine(workspace.Path, "js"); 233await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 235await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"))); 242using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 244var appDir = Path.Combine(workspace.Path, "js"); 251await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 253var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 262using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 264var appDir = Path.Combine(workspace.Path, "js"); 276await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 278var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 289using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 291var appDir = Path.Combine(workspace.Path, "js"); 300await ManifestUtils.GetManifest(app.Resource, workspace.Path); 302var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 315using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 317var appDir = Path.Combine(workspace.Path, "js"); 331await ManifestUtils.GetManifest(app.Resource, workspace.Path); 333var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 346using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 348var appDir = Path.Combine(workspace.Path, "js"); 355() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 366using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 368var appDir = Path.Combine(workspace.Path, "js"); 375() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 386using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 388var appDir = Path.Combine(workspace.Path, "js"); 396await ManifestUtils.GetManifest(app.Resource, workspace.Path); 398var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile")); 410using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 412var appDir = Path.Combine(workspace.Path, "js"); 421await ManifestUtils.GetManifest(app.Resource, workspace.Path); 423var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile")); 435using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 437var appDir = Path.Combine(workspace.Path, "js"); 441await ManifestUtils.GetManifest(app.Resource, workspace.Path); 443var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 453using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 455var appDir = Path.Combine(workspace.Path, "js"); 460await ManifestUtils.GetManifest(app.Resource, workspace.Path); 462var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 472using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 474var appDir = Path.Combine(workspace.Path, "js"); 481await ManifestUtils.GetManifest(app.Resource, workspace.Path); 483var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 499using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 501var appDir = Path.Combine(workspace.Path, "js"); 508() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 518using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 520var appDir = Path.Combine(workspace.Path, "js"); 527await ManifestUtils.GetManifest(app.Resource, workspace.Path); 529Assert.False(File.Exists(Path.Combine(workspace.Path, "js.Dockerfile"))); 536using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 538var appDir = Path.Combine(workspace.Path, "js"); 548await ManifestUtils.GetManifest(app.Resource, workspace.Path); 550var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 563using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 565var appDir = Path.Combine(workspace.Path, "js"); 579await ManifestUtils.GetManifest(app.Resource, workspace.Path); 581var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 606using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 608var appDir = Path.Combine(workspace.Path, "js"); 615await ManifestUtils.GetManifest(app.Resource, workspace.Path); 619var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 627using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 629var appDir = Path.Combine(workspace.Path, "js"); 636await ManifestUtils.GetManifest(app.Resource, workspace.Path); 640var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 648using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 650var appDir = Path.Combine(workspace.Path, "js"); 659await ManifestUtils.GetManifest(app.Resource, workspace.Path); 661var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 670using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 672var appDir = Path.Combine(workspace.Path, "js"); 681await ManifestUtils.GetManifest(app.Resource, workspace.Path); 684var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 692using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 694var appDir = Path.Combine(workspace.Path, "js"); 703await ManifestUtils.GetManifest(app.Resource, workspace.Path); 705var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 721using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 723var appDir = Path.Combine(workspace.Path, "js"); 741await ManifestUtils.GetManifest(app.Resource, workspace.Path); 743var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 752using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 754var appDir = Path.Combine(workspace.Path, "js"); 762await ManifestUtils.GetManifest(app.Resource, workspace.Path); 764var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 856using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 858var appDir = Path.Combine(workspace.Path, "js"); 868await ManifestUtils.GetManifest(app.Resource, workspace.Path); 870var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 880using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 882var appDir = Path.Combine(workspace.Path, "js"); 889await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 891var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 899using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 901var appDir = Path.Combine(workspace.Path, "js"); 908await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 910var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 918using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 920var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 923var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.Path)); 932using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 934var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 938var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.Path)); 947using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 949var appDir = Path.Combine(workspace.Path, "js"); 956await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 958var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 968using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 970var appDir = Path.Combine(workspace.Path, "js"); 979await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 981var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 991using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 993var appDir = Path.Combine(workspace.Path, "js"); 1000await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1002var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1017using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1019var appDir = Path.Combine(workspace.Path, "js"); 1025await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1027var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1035using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1037var appDir = Path.Combine(workspace.Path, "js"); 1044await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1046var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1056using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1058var appDir = Path.Combine(workspace.Path, "js"); 1065await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1067var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1077using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1079var appDir = Path.Combine(workspace.Path, "js"); 1088var manifest = await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1091var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1103var appDir = Path.Combine(workspace.Path, "js"); 1121var appDir = Path.Combine(workspace.Path, "js"); 1148var appDir = Path.Combine(workspace.Path, "js"); 1177var appDir = Path.Combine(workspace.Path, "js"); 1196var appDir = Path.Combine(workspace.Path, "js"); 1223using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1225var appDir1 = Path.Combine(workspace.Path, "js1"); 1226var appDir2 = Path.Combine(workspace.Path, "js2"); 1238await ManifestUtils.GetManifest(denoApp2.Resource, workspace.Path); 1240var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js2.Dockerfile")); 1250File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');"); 1254builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1272File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 1276builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1299File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 1303builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1321File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');"); 1324builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1489builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 1504var app = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 1521var app = builder.AddJavaScriptApp("js", workspace.Path) 1538var app = builder.AddJavaScriptApp("js", workspace.Path) 1556builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 1573using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1575var appDir = Path.Combine(workspace.Path, "js"); 1582await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1584var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1597using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1599var appDir = Path.Combine(workspace.Path, "js"); 1607await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1609var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1624using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1626var appDir = Path.Combine(workspace.Path, "js"); 1633await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1635var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1644using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1646var appDir = Path.Combine(workspace.Path, "js"); 1652await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1654var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1679using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1681var appDir = Path.Combine(workspace.Path, "js"); 1688() => ManifestUtils.GetManifest(denoApp.Resource, workspace.Path)); 2292var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2332var exception = Assert.Throws<ArgumentException>(() => builder.AddDenoApp("denoapp", workspace.Path, scriptPath)); 2343using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 2345var appDir = Path.Combine(workspace.Path, "deno-app"); 2354await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 2356var dockerfilePath = Path.Combine(workspace.Path, "deno-app.Dockerfile"); 2526var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2539var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2551var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2565var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2572Assert.Equal(Path.GetFullPath("main.ts", workspace.Path), launchConfig.ScriptPath); 2583File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2585var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2601File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2603var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2620File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2622var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2639var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2655var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2674var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts");
AddJavaScriptAppTests.cs (83)
22using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 24var appDir = Path.Combine(workspace.Path, "js"); 31await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 33var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 44using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 46var appDir = Path.Combine(workspace.Path, "js"); 54await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 56var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 64using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 66var appDir = Path.Combine(workspace.Path, "js"); 74await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 76var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 84using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 86var appDir = Path.Combine(workspace.Path, "js"); 94await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 96var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 106using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 109var appDir = Path.Combine(workspace.Path, "js"); 121await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 123var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 133using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 135var appDir = Path.Combine(workspace.Path, "js"); 142await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 144var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 167using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 169var appDir = Path.Combine(workspace.Path, "js"); 182await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 184var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 194using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 196var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 200var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 211using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 213var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 219var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.Path)); 230using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 232var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 237var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 251var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 272var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 294var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 319var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 339using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 341var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 345var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 354using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 356var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 363var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 373using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 375var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 382var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 391using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 393var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 398var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 409using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 411var appDir = Path.Combine(workspace.Path, "js"); 420await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 422var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 440using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 442var appDir = Path.Combine(workspace.Path, "js"); 456await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 458var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 474using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 476var appDir = Path.Combine(workspace.Path, "js"); 491await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 493var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 506using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 508var appDir = Path.Combine(workspace.Path, "js"); 522await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 524var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 535using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 537var appDir = Path.Combine(workspace.Path, "js"); 551await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 553var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 574using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 576var appDir = Path.Combine(workspace.Path, "js"); 600using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 603var appDir = Path.Combine(workspace.Path, "pnpm-app"); 623await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 625var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile"); 696using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 698var appDir = Path.Combine(workspace.Path, "pnpm-app"); 719await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 721var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile");
AddNodeAppTests.cs (28)
97using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 99var appDir = Path.Combine(workspace.Path, "js"); 110await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 112var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 165using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 167var appDir = Path.Combine(workspace.Path, "js"); 179await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 181var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 212using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 214var appDir = Path.Combine(workspace.Path, "js"); 224await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 227var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 236File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "{}"); 240builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 263File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 267builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 439var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 452var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 464var viteApp = builder.AddViteApp("viteapp", workspace.Path); 477var viteApp = builder.AddViteApp("viteapp", workspace.Path) 504var viteApp = builder.AddViteApp("viteapp", workspace.Path) 521var viteApp = builder.AddViteApp("viteapp", workspace.Path) 538var resource = new JavaScriptAppResource("jsapp", "npm", workspace.Path); 559File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "console.log('hello');"); 561var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js") 597var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 604Assert.Equal(Path.GetFullPath("app.js", workspace.Path), launchConfig.ScriptPath); 613var viteApp = builder.AddViteApp("viteapp", workspace.Path);
AddViteAppTests.cs (101)
22using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 25var viteDir = Path.Combine(workspace.Path, "vite"); 34var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 60var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 84using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 86var viteDir = Path.Combine(workspace.Path, "vite"); 94await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 96var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 110using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 112var viteDir = Path.Combine(workspace.Path, "vite"); 116var apiDir = Path.Combine(workspace.Path, "api"); 127await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 129var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 137using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 139var viteDir = Path.Combine(workspace.Path, "vite"); 158using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 160var viteDir = Path.Combine(workspace.Path, "vite"); 164var apiDir = Path.Combine(workspace.Path, "api"); 188using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 190var appDir = Path.Combine(workspace.Path, "angular"); 198await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 200var dockerfilePath = Path.Combine(workspace.Path, "angular.Dockerfile"); 214using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 216var appDir = Path.Combine(workspace.Path, "vite"); 224await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 226var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 237using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 239var nextDir = Path.Combine(workspace.Path, "nextjs"); 246await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 248var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile"); 258using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 260var nextDir = Path.Combine(workspace.Path, "nextjs"); 267await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 269var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile"); 277using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 279var appDir = Path.Combine(workspace.Path, "nuxt"); 287await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 289var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile"); 297using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 299var appDir = Path.Combine(workspace.Path, "nuxt"); 307await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 309var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile"); 319File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), "18.20.0"); 321using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 322var nodeApp = builder.AddViteApp("vite", workspace.Path) 325var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 327var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 339File.WriteAllText(Path.Combine(workspace.Path, ".node-version"), "v21.5.0"); 341using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 342var nodeApp = builder.AddViteApp("vite", workspace.Path) 345var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 347var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 364File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions); 366using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 367var nodeApp = builder.AddViteApp("vite", workspace.Path) 370var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 372var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 390File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions); 392using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 393var nodeApp = builder.AddViteApp("vite", workspace.Path) 396var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 398var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 416File.WriteAllText(Path.Combine(workspace.Path, "package.json"), packageJson); 418using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 419var nodeApp = builder.AddViteApp("vite", workspace.Path) 422var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 424var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 435using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 436var nodeApp = builder.AddViteApp("vite", workspace.Path) 439var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 441var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 457File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), versionString); 459using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 460var nodeApp = builder.AddViteApp("vite", workspace.Path) 463var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 465var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 474using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 477var nodeApp = builder.AddViteApp("vite", workspace.Path) 481var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 487var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 545Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 548var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 552var viteApp = builder.AddViteApp("test-app", workspace.Path) 606Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 609var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 613var viteApp = builder.AddViteApp("test-app", workspace.Path); 665var viteApp = builder.AddViteApp("test-app", workspace.Path); 710var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 714builder.AddViteApp("test-app", workspace.Path); 753Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 756var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 760var viteApp = builder.AddViteApp("test-app", workspace.Path); 808var repoRoot = Path.Combine(workspace.Path, "repo"); 884var repoRoot = Path.Combine(workspace.Path, "repo"); 947var repoRoot = Path.Combine(workspace.Path, "repo"); 993Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 996var viteConfigPath = Path.Combine(workspace.Path, configFileName); 1000var viteApp = builder.AddViteApp("test-app", workspace.Path); 1048var nextDir = Path.Combine(workspace.Path, "nextjs"); 1071var nextDir = Path.Combine(workspace.Path, "nextjs"); 1092var nextDir = Path.Combine(workspace.Path, "nextjs");
PackageInstallationTests.cs (15)
458File.WriteAllText(Path.Combine(workspace.Path, "package-lock.json"), "empty"); 462var app = builder.AddViteApp("test-app", workspace.Path) 485File.WriteAllText(Path.Combine(workspace.Path, "yarn.lock"), "empty"); 489var app = builder.AddViteApp("test-app", workspace.Path) 495var app2 = builder.AddViteApp("test-app2", workspace.Path) 506File.WriteAllText(Path.Combine(workspace.Path, "yarn.lock"), "empty"); 507File.WriteAllText(Path.Combine(workspace.Path, ".yarnrc.yml"), "empty"); 511var app = builder.AddViteApp("test-app", workspace.Path) 522File.WriteAllText(Path.Combine(workspace.Path, "yarn.lock"), "empty"); 523Directory.CreateDirectory(Path.Combine(workspace.Path, ".yarn", "releases")); 527var app = builder.AddViteApp("test-app", workspace.Path) 538File.WriteAllText(Path.Combine(workspace.Path, "pnpm-lock.yaml"), "empty"); 542var app = builder.AddViteApp("test-app", workspace.Path) 553File.WriteAllText(Path.Combine(workspace.Path, "bun.lock"), "empty"); 557var app = builder.AddViteApp("test-app", workspace.Path)
RequiredCommandTests.cs (10)
27var app = builder.AddNodeApp("app", workspace.Path, "server.js"); 39var app = builder.AddNodeApp("app", workspace.Path, "server.js") 51var app = builder.AddNodeApp("app", workspace.Path, "server.js") 64var app = builder.AddNodeApp("app", workspace.Path, "server.js") 155File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 157var app = builder.AddBunApp("app", workspace.Path, "server.ts"); 168File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 170var app = builder.AddDenoApp("app", workspace.Path, "server.ts"); 181var app = builder.AddDenoApp("app", workspace.Path, "server.ts") 194var app = builder.AddBunApp("app", workspace.Path, "server.ts")
Aspire.Hosting.Keycloak.Tests (2)
KeycloakPublicApiTests.cs (2)
158keycloak.WithRealmImport(workspace.Path); 177var filePath = Path.Combine(workspace.Path, file);
Aspire.Hosting.Kubernetes.Tests (312)
KubernetesDeployTests.cs (60)
307workspace.Path, 348workspace.Path, 388workspace.Path, 429workspace.Path, 469workspace.Path, 504workspace.Path, 540workspace.Path, 564workspace.Path, 589workspace.Path, 796var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 830var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 844var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml")); 857var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 875var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml")); 888var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 897var deploymentYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", "svc", "deployment.yaml")); 911workspace.Path, 938var outputPath = Path.Combine(workspace.Path, "env"); 985var outputPath = Path.Combine(workspace.Path, "env"); 1005var outputPath = Path.Combine(workspace.Path, "env"); 1079var outputPath = Path.Combine(workspace.Path, "env"); 1130workspace.Path, 1163workspace.Path, 1236var outputPath = Path.Combine(workspace.Path, "env"); 1286var outputPath = Path.Combine(workspace.Path, "env"); 1309workspace.Path, 1335var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1358var serverSecretsTemplatePath = Path.Combine(workspace.Path, "templates", "server", "secrets.yaml"); 1380workspace.Path, 1410var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1437var outputPath = Path.Combine(workspace.Path, "deploy"); 1499workspace.Path, 1525workspace.Path, env, CancellationToken.None); 1527var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1553workspace.Path, 1586workspace.Path, env, CancellationToken.None); 1588var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1599workspace.Path, 1631workspace.Path, env, CancellationToken.None); 1633var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1644workspace.Path, 1671workspace.Path, env, CancellationToken.None); 1673var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1674await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1676await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", "myapp", "config.yaml")), 1736workspace.Path, 1751var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1773workspace.Path, 1792var configPath = Path.Combine(workspace.Path, "templates", resourceName, "config.yaml"); 1810workspace.Path, 1827var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1845workspace.Path, 1862var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1881workspace.Path, 1898var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1939workspace.Path, 1970workspace.Path, 2010workspace.Path, 2055workspace.Path, 2103workspace.Path,
KubernetesEnvironmentResourceTests.cs (5)
20using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 30var chartYaml = Path.Combine(workspace.Path, "Chart.yaml"); 31var valuesYaml = Path.Combine(workspace.Path, "values.yaml"); 32var deploymentYaml = Path.Combine(workspace.Path, "templates", "service", "deployment.yaml"); 96var outputPath = Path.Combine(workspace.Path, "output");
KubernetesGatewayTests.cs (33)
18var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 34var gatewayDir = Path.Combine(workspace.Path, "templates", "public"); 61var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 75var gatewayDir = Path.Combine(workspace.Path, "templates", "public"); 88var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 106var gatewayPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 107var routePath = Path.Combine(workspace.Path, "templates", "public", "route.yaml"); 108var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 119var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 136var routePath = Path.Combine(workspace.Path, "templates", "public", "route.yaml"); 145var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 175var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 210var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 239var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 256var gatewayFile = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 274var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 291var gatewayDir = Path.Combine(workspace.Path, "templates", "public"); 300var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 322var gatewayDir = Path.Combine(workspace.Path, "templates", "public"); 335var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 356var gatewayDir = Path.Combine(workspace.Path, "templates", "empty"); 371var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 423var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 434var templatesDir = Path.Combine(workspace.Path, "templates", "myapi"); 446var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 464var gatewayFile = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 496var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 513var gatewayFile = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 533var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 558var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 580var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 596var gatewayFile = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 613var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path);
KubernetesIngressTests.cs (48)
18var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 34var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 50var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 64var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 86$"Pipeline:OutputPath={workspace.Path}", 108var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 115var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 132var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 149var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 160var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 177var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 178var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 188var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 204var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 213var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 228var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 237var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 253var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 265var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 282var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 295var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 315var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 328var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 343var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 353var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 367var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 380var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 393var ingressDir = Path.Combine(workspace.Path, "templates", "empty"); 406var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 439var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 459var ingressDir = Path.Combine(workspace.Path, "templates", "public"); 481var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 514var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 544var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 556var ingressDir = Path.Combine(workspace.Path, "templates", "empty"); 564var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 576var templatesDir = Path.Combine(workspace.Path, "templates", "myapi"); 587var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 612var publicPath = Path.Combine(workspace.Path, "templates", "public-ingress", "public-ingress.yaml"); 613var internalPath = Path.Combine(workspace.Path, "templates", "internal-ingress", "internal-ingress.yaml"); 629var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 647var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 664var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 682var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml"); 733var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 758var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 781var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 798var ingressPath = Path.Combine(workspace.Path, "templates", "public", "public.yaml");
KubernetesPublisherTests.cs (166)
33using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 55using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 80await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.Path, environment.Resource, TestContext.Current.CancellationToken); 83var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 89var exitCode = await new DefaultHelmRunner().RunAsync(arguments, workspace.Path, 118using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 156using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 191using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 215await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 226using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 259await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml").UseParameters(gateway, tls); 270using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 310using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 323await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 340using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 371using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 388await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.Path, environment.Resource, cts.Token); 390await 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"); 402var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 437await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")), "yaml") 445var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 494var filePath = Path.Combine(workspace.Path, expectedFile); 517var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 543var deployment = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")); 566await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml"))); 575Assert.False(File.Exists(Path.Combine(workspace.Path, "templates/myapp/config.yaml"))); 576Assert.False(File.Exists(Path.Combine(workspace.Path, "templates/myapp/secrets.yaml"))); 585var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 605var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 621var deployment = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")); 642var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 661var deploymentPath = Path.Combine(workspace.Path, "templates/service/deployment.yaml"); 673var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 719var filePath = Path.Combine(workspace.Path, expectedFile); 739var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 774Directory.GetFiles(Path.Combine(workspace.Path, "templates", "myapp"), "*.yaml"), 800var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 846Directory.GetFiles(Path.Combine(workspace.Path, "templates", "myapp"), "*.yaml"), 878var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 902var manifestPath = Path.Combine(workspace.Path, "templates/myapp/scaler.yaml"); 933var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 952var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 978var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1005var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1077var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1094var templatesFolder = Path.Combine(workspace.Path, "templates", "myapp"); 1150var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1191var filePath = Path.Combine(workspace.Path, expectedFile); 1211var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1245var filePath = Path.Combine(workspace.Path, expectedFile); 1265var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1277var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 1288var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1352var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1362var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1401var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1411var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1436var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1446var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1529var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1594var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1630var filePath = Path.Combine(workspace.Path, expectedFile); 1653var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1684await 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") 1693var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1704await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 1715var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1731var publishedValues = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")); 1732await HelmDeploymentEngine.ResolveAndWriteDeployValuesAsync(workspace.Path, environment.Resource, CancellationToken.None); 1735.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml") 1743var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1753await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 1762var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1776await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1786var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1800await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1808var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1820await 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"); 1829var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1837await 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"); 1848var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1874var filePath = Path.Combine(workspace.Path, expectedFile); 1892var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1918var filePath = Path.Combine(workspace.Path, expectedFile); 1936var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1944var servicePath = Path.Combine(workspace.Path, "templates/database/service.yaml"); 1957var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1980var filePath = Path.Combine(workspace.Path, expectedFile); 2007var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2032var filePath = Path.Combine(workspace.Path, expectedFile); 2055var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2075var filePath = Path.Combine(workspace.Path, expectedFile); 2093var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2120var filePath = Path.Combine(workspace.Path, expectedFile); 2140var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2166var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2192var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2216var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2252var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2275var filePath = Path.Combine(workspace.Path, expectedFile); 2295var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2321var filePath = Path.Combine(workspace.Path, expectedFile); 2341var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2382var filePath = Path.Combine(workspace.Path, expectedFile); 2402var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2433var filePath = Path.Combine(workspace.Path, expectedFile); 2453var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2495var filePath = Path.Combine(workspace.Path, expectedFile); 2515var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2531var valuesContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")); 2541var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2580var filePath = Path.Combine(workspace.Path, expectedFile); 2600var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2634var filePath = Path.Combine(workspace.Path, expectedFile); 2664var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2691var filePath = Path.Combine(workspace.Path, expectedFile); 2710var legacyPv = Path.Combine(workspace.Path, "templates", "service", "data-pv.yaml"); 2725var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2740var deploymentPath = Path.Combine(workspace.Path, "templates", "service", "deployment.yaml"); 2758var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2785var filePath = Path.Combine(workspace.Path, expectedFile); 2798var legacyPvc = Path.Combine(workspace.Path, "templates", "service", "data-pvc.yaml"); 2802var deploymentPath = Path.Combine(workspace.Path, "templates", "service", "deployment.yaml"); 2815var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2840var filePath = Path.Combine(workspace.Path, expectedFile); 2858var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2880var claimPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 2890var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2907var omittedClaimPath = Path.Combine(workspace.Path, "templates", "omitted", "omitted.yaml"); 2908var emptyClaimPath = Path.Combine(workspace.Path, "templates", "empty", "empty.yaml"); 2923using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2949var content = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", name, $"{name}.yaml")); 2962using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2987var content = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", name, $"{name}.yaml")); 3000using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3023var content = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", "data", "data.yaml")); 3031var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3049var statefulSetPath = Path.Combine(workspace.Path, "templates", "api", "statefulset.yaml"); 3059var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3076var statefulSetPath = Path.Combine(workspace.Path, "templates", "api", "statefulset.yaml"); 3096var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3127var filePath = Path.Combine(workspace.Path, expectedFile); 3145var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3166Assert.Equal("default-class", ReadStorageClassName(workspace.Path, "default")); 3167Assert.Equal("explicit-class", ReadStorageClassName(workspace.Path, "explicit")); 3168Assert.Null(ReadStorageClassName(workspace.Path, "omitted")); 3175var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3207var filePath = Path.Combine(workspace.Path, expectedFile); 3229var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3245var statefulSetPath = Path.Combine(workspace.Path, "templates", "service", "statefulset.yaml"); 3251var pvcPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 3269var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3300var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3315var statefulSetPath = Path.Combine(workspace.Path, "templates", "api", "statefulset.yaml"); 3362var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 3389var pvcPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 3401var valuesPath = Path.Combine(workspace.Path, "values.yaml");
Aspire.Hosting.Maui.Tests (65)
MauiiOSValidationTests.cs (6)
24var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 50var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 76var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 97var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 116var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 135var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiOtlpTemplateTests.cs (4)
26var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 53var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 80var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 107var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiPlatformExtensionsTests.cs (38)
97var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 120var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 140var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 159var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 188var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 236var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 255var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 279var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 308var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 334var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 357var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 380var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 403var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 431var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 456var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 485var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 510var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 537var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 564var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 631var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 661var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 685var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 708var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 746var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 799var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 864var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 903var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 956var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1022var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1059var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1076var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1098var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1129var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1156var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1186var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1268var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1304var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1367var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiUnsupportedPlatformTests.cs (6)
17var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 41var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 65var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 89var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 114var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 129var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiWithArgsTests.cs (11)
21var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 39var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 58var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 78var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 95var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 115var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 132var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 151var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 168var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 188var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 210var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
Aspire.Hosting.MySql.Tests (3)
AddMySqlTests.cs (2)
278builder.Configuration["Aspire:Store:Path"] = workspace.Path; 313builder.Configuration["Aspire:Store:Path"] = workspace.Path;
MySqlFunctionalTests.cs (1)
570.WithTempAspireStore(workspace.Path)
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (2)
503builder.Configuration["Aspire:Store:Path"] = workspace.Path; 565builder.Configuration["Aspire:Store:Path"] = workspace.Path;
PostgresFunctionalTests.cs (1)
557.WithTempAspireStore(workspace.Path)
Aspire.Hosting.Python.Tests (124)
AddPythonAppTests.cs (124)
431builder.AddPythonApp("pythonProject", workspace.Path, "main.py")); 444builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 453var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 477builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 517var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 536var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 591options.ProjectDirectory = workspace.Path; 637options.ProjectDirectory = workspace.Path; 711options.ProjectDirectory = workspace.Path; 766var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 776var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 797var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 817builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 855var pythonBuilder = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 875var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 898var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 923var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 954var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 981var pythonBuilder = builder.AddPythonApp("python-script", workspace.Path, "main.py"); 1000var pythonBuilder = builder.AddPythonModule("flask-app", workspace.Path, "flask"); 1019var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.Path, "pytest"); 1040builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 1050var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1076builder.AddPythonModule("pythonProject", workspace.Path, moduleName); 1084var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1110builder.AddPythonExecutable("pythonProject", workspace.Path, executableName); 1118var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1141var pythonBuilder = builder.AddPythonModule("flask-app", workspace.Path, "flask") 1165var pythonBuilder = builder.AddPythonApp("python-app", workspace.Path, "main.py") 1187var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.Path, "pytest") 1209var pythonBuilder = builder.AddPythonApp("python-app", workspace.Path, "main.py") 1239var pythonBuilder = builder.AddPythonApp("python-app", workspace.Path, "main.py"); 1286var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 1305using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1311var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 1324using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1331var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.Path)); 1363using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1376var manifest = await ManifestUtils.GetManifest(resource, workspace.Path); 1386using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1391var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 1400using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1406var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 1415using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1421var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 1565using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 1576var manifest = await ManifestUtils.GetManifestForModel(appModel, workspace.Path); 1739var appDirectory = Path.Combine(workspace.Path, "myapp"); 1741var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1783var appDirectory = Path.Combine(workspace.Path, "myapp"); 1785var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1823var appDirectory = Path.Combine(workspace.Path, "myapp"); 1825var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1858var appDirectory = Path.Combine(workspace.Path, "myapp"); 1860var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1879var appDirectory = Path.Combine(workspace.Path, "myapp"); 1881var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1903var appDirectory = Path.Combine(workspace.Path, "myapp"); 1905var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1927var appDirectory = Path.Combine(workspace.Path, "myapp"); 1929var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1931var customWorkingDirectory = Path.Combine(workspace.Path, "custom"); 1954var appDirectory = Path.Combine(workspace.Path, "myapp"); 1956var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1958var customWorkingDirectory = Path.Combine(workspace.Path, "custom"); 1995var appDirectory = Path.Combine(workspace.Path, "myapp"); 1997var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 2028var appDirectory = Path.Combine(workspace.Path, "myapp"); 2030var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 2057var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 2079var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 2097var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 2350var scriptPath = Path.Combine(workspace.Path, scriptName); 2354var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml"); 2357var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2384var scriptPath = Path.Combine(workspace.Path, scriptName); 2388var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2391var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2419var scriptPath = Path.Combine(workspace.Path, scriptName); 2423var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml"); 2425var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2428var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2449var scriptPath = Path.Combine(workspace.Path, scriptName); 2452var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2473var scriptPath = Path.Combine(workspace.Path, scriptName); 2477builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2496var scriptPath = Path.Combine(workspace.Path, scriptName); 2500var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2504builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2524var scriptPath = Path.Combine(workspace.Path, scriptName); 2528var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2532builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2553var scriptPath = Path.Combine(workspace.Path, "main.py"); 2556var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2581var scriptPath = Path.Combine(workspace.Path, "main.py"); 2585var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2588var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2624var scriptPath = Path.Combine(workspace.Path, "main.py"); 2627var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2630var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2654var scriptPath = Path.Combine(workspace.Path, "main.py"); 2657var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2660var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2688var scriptPath = Path.Combine(workspace.Path, "main.py"); 2691var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2695var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2724var scriptPath = Path.Combine(workspace.Path, "main.py"); 2727var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2731var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2754var scriptPath = Path.Combine(workspace.Path, "main.py"); 2757var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2761var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2786var scriptPath = Path.Combine(workspace.Path, "main.py"); 2789var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2793var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2818var scriptPath = Path.Combine(workspace.Path, "main.py"); 2821var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2824var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2854var scriptPath = Path.Combine(workspace.Path, "main.py"); 2857var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2889builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2908var scriptPath = Path.Combine(workspace.Path, scriptName); 2911var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2914builder.AddPythonApp("pythonProject", workspace.Path, scriptName)
Aspire.Hosting.Tests (447)
ConditionalReferenceExpressionTests.cs (4)
128using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 138app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path).DefaultTimeout(); 147using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 157app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path);
Dashboard\DashboardEventHandlersTests.cs (1)
449["Aspire:Store:Path"] = workspace.Path,
Dcp\ProcessCaptureTests.cs (14)
23var app = DotnetFileAppProcess.WriteApp(workspace.Path, "echo.cs", """ 35DotnetFileAppProcess.CreateArguments(app), workspace.Path, standardInput: Encoding.UTF8.GetBytes(input), 47var app = DotnetFileAppProcess.WriteApp(workspace.Path, "environment.cs", """ 54DotnetFileAppProcess.CreateArguments(app, arguments), workspace.Path, 58Assert.Equal(new ProcessCaptureResult(0, "overridden|" + inheritedPath + "|ü|" + workspace.Path + "|" + string.Join("|", arguments), ""), result); 67var app = DotnetFileAppProcess.WriteApp(workspace.Path, "pressure.cs", """ 88DotnetFileAppProcess.CreateArguments(app, [errorFirst.ToString()]), workspace.Path, 100var app = DotnetFileAppProcess.WriteApp(workspace.Path, "reject.cs", """ 112DotnetFileAppProcess.CreateArguments(app), workspace.Path, standardInput: new byte[inputSize], cancellationToken: cancellation.Token); 121var missing = Path.Combine(workspace.Path, "missing-executable"); 124await Assert.ThrowsAsync<Win32Exception>(() => runner.RunAndCaptureTextAsync(missing, [], workspace.Path)); 127await Assert.ThrowsAnyAsync<OperationCanceledException>(() => runner.RunAndCaptureTextAsync(missing, [], workspace.Path, cancellationToken: cancellation.Token)); 137var app = DotnetFileAppProcess.WriteApp(workspace.Path, "cancel.cs", """ 164DotnetFileAppProcess.CreateArguments(app, [name]), workspace.Path, standardInput: new byte[2000000], cancellationToken: cancellation.Token);
Dcp\ProcessUtilTests.cs (4)
224var app = DotnetFileAppProcess.WriteApp(workspace.Path, "legacy-lines.cs", """ 254var (executable, arguments) = await DotnetFileAppProcess.CreateInputRejectingProcessAsync(workspace.Path, exitCode.ToString(), TestContext.Current.CancellationToken); 295var (executable, arguments) = await DotnetFileAppProcess.CreateInputRejectingProcessAsync(workspace.Path, "wait", TestContext.Current.CancellationToken); 348workspace.Path, pipeName, holdStandardInput, hasStandardInput, exitCode, TestContext.Current.CancellationToken);
ManifestExpressionTests.cs (4)
97var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path) 443var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path) 514using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 524app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path);
Pipelines\PipelineOutputDiffingLifetimeTests.cs (2)
33outputPath: workspace.Path, step: "publish-and-diff"); 144outputPath: workspace.Path, step: "publish-and-diff");
Pipelines\PipelineOutputDiffingTests.cs (103)
26using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 62using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 94using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 166var artifact = Path.Combine(workspace.Path, "artifact.bin"); 167var control = Path.Combine(workspace.Path, "control.bin"); 189using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 222var artifact = Path.Combine(workspace.Path, "early.txt"); 223using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 250var artifact = Path.Combine(workspace.Path, "factory.txt"); 251using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "check-alias"); 306using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 328var artifact = Path.Combine(workspace.Path, "late.txt"); 329using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 365using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 372var artifact = Path.Combine(workspace.Path, "ordinary.txt"); 388var artifact = Path.Combine(workspace.Path, "tracked.tmp"); 389await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "**/bin/\n**/obj/\n*.tmp\n", TestContext.Current.CancellationToken); 391await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 392await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.excludesFile", Path.Combine(workspace.Path, ".git", "info", "exclude")); 393await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "-f", "--", ".gitignore", "tracked.tmp"); 395Assert.Contains("tracked.tmp", await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "diff", "--name-only")); 396using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 401Assert.False(Directory.Exists(Path.Combine(workspace.Path, "src", "Api", "bin"))); 402Assert.False(Directory.Exists(Path.Combine(workspace.Path, "src", "Api", "obj"))); 413Assert.False(Directory.Exists(Path.Combine(workspace.Path, "src"))); 418Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message); 426Assert.True(File.Exists(Path.Combine(workspace.Path, "src", "Api", "bin", "Release", "Api.dll"))); 427Assert.True(File.Exists(Path.Combine(workspace.Path, "src", "Api", "obj", "project.assets.json"))); 443await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "**/bin/\n**/obj/\n", TestContext.Current.CancellationToken); 444await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 445await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.excludesFile", Path.Combine(workspace.Path, ".git", "info", "exclude")); 446await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", ".gitignore", "src", "generated"); 447using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 466Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message); 498using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 547Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message); 568await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "generated/\n", TestContext.Current.CancellationToken); 569await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 570await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.excludesFile", Path.Combine(workspace.Path, ".git", "info", "exclude")); 571Assert.Equal("generated/deployment.yaml", (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "check-ignore", "--", "generated/deployment.yaml")).Trim()); 572using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 592Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message); 608await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitattributes"), "*.yaml text eol=lf\n", TestContext.Current.CancellationToken); 609await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "generated/\n", TestContext.Current.CancellationToken); 610await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 611await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.autocrlf", "false"); 612await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.safecrlf", "false"); 613await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.excludesFile", Path.Combine(workspace.Path, ".git", "info", "exclude")); 614await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", ".gitattributes", ".gitignore"); 615Assert.Equal("generated/deployment.yaml", (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "check-ignore", "--", "generated/deployment.yaml")).Trim()); 616var beforeObject = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "hash-object", "--", artifact); 617using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 632Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message); 635var afterObject = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "hash-object", "--", artifact); 643var artifact = Path.Combine(workspace.Path, "stable.txt"); 645using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 658Assert.False(Directory.Exists(Path.Combine(workspace.Path, ".git"))); 662Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.Message); 696var changed = Path.Combine(workspace.Path, "changed.txt"); 697var removed = Path.Combine(workspace.Path, "removed.txt"); 698var added = Path.Combine(workspace.Path, "added.txt"); 701using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 718Added: {Path.GetRelativePath(workspace.Path, added)} 719Changed: {Path.GetRelativePath(workspace.Path, changed)} 720Removed: {Path.GetRelativePath(workspace.Path, removed)} 733var artifact = Path.Combine(workspace.Path, "unchanged.txt"); 735using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 752Assert.Contains("Changed: " + Path.GetRelativePath(workspace.Path, artifact), failure.ToString()); 774var artifact = Path.Combine(workspace.Path, "stable.txt"); 776using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: selectBoth ? "both-checks" : "first-check"); 836var artifact = Path.Combine(workspace.Path, "result.txt"); 837using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 867var artifact = Path.Combine(workspace.Path, "custom.txt"); 868using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "custom-check"); 891var artifact = Path.Combine(workspace.Path, "cancelled.txt"); 892using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 918var included = Path.Combine(workspace.Path, "included.txt"); 919var excluded = Path.Combine(workspace.Path, "excluded.tmp"); 922using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 958Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Removed: " + Path.GetRelativePath(workspace.Path, included), failure.Message); 967var artifact = Path.Combine(workspace.Path, "tracked.txt"); 968var added = Path.Combine(workspace.Path, "untracked.txt"); 969var excluded = Path.Combine(workspace.Path, "excluded.tmp"); 971await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 972await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "tracked.txt"); 973Assert.Empty(await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "diff", "--name-only")); 974using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "publish-and-diff"); 976builder.Services.AddTransient<IPipelineOutputSnapshotter<GitSnapshot>>(_ => new GitSnapshotter(workspace.Path)); 991Changed: {Path.GetRelativePath(workspace.Path, artifact)} 992Added: {Path.GetRelativePath(workspace.Path, added)} 997Assert.Equal("old", (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "show", ":tracked.txt")).Trim()); 1005var artifact = Path.Combine(workspace.Path, "stable.txt"); 1007using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path, step: "both-checks"); 1010var comparer = new DirectoryComparer(workspace.Path, relocated); 1011var provider = new CountingOutputService(workspace.Path, relocated); 1023Assert.Equal(new[] { workspace.Path }, directories.Directories); 1033Assert.Equal(new[] { workspace.Path }, directories.Directories); 1043Assert.NotEqual(workspace.Path, relocated); 1048Assert.Equal(new[] { workspace.Path, relocated }, directories.Directories);
Pipelines\PipelineOutputGitFingerprintTests.cs (107)
32await InitializeAsync(workspace.Path, "sha1"); 33File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt " + attributes + "\n"); 37await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", ".gitattributes", "output/model.txt"); 38var index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 39var objects = ReadObjects(workspace.Path); 40var beforeOid = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "hash-object", "--", "output/model.txt"); 45var afterOid = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "hash-object", "--", "output/model.txt"); 51Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 52AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 71await InitializeAsync(workspace.Path, "sha1"); 73File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "output*/**/*.txt filter=stripspace -text\n"); 74await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.stripspace.clean", "git stripspace"); 75await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.stripspace.required", "true"); 82await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", gitPath); 90var beforeOid = (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "hash-object", "--", gitPath)).TrimEnd('\r', '\n'); 98var afterOid = (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "hash-object", "--", gitPath)).TrimEnd('\r', '\n'); 113var indexed = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--cached", "--full-name", "-z", "--", gitPath); 114var untracked = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--others", "--exclude-standard", "--full-name", "-z", "--", gitPath); 117var status = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "status", 147await InitializeAsync(workspace.Path, "sha1"); 153await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 157var indexPath = Path.Combine(workspace.Path, ".git", "index"); 159var objects = ReadObjects(workspace.Path); 172AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 201await InitializeAsync(workspace.Path, "sha1"); 202await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.filemode", "false"); 205await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 206var beforeEntry = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/model.txt"); 208var indexPath = Path.Combine(workspace.Path, ".git", "index"); 214await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", "--chmod=+x", "--", "output/model.txt"); 215var afterEntry = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/model.txt"); 231await InitializeAsync(workspace.Path, "sha1"); 239await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/link"); 240var entries = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/link"); 242var indexPath = Path.Combine(workspace.Path, ".git", "index"); 244var objects = ReadObjects(workspace.Path); 254var status = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "status", 264AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 292await InitializeAsync(workspace.Path, objectFormat); 293await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.symlinks", "true"); 295var target = Path.Combine(workspace.Path, "target.txt"); 311await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/link"); 312var entry = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/link"); 316var linkBlob = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "cat-file", "blob", oid); 318var index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 319var objects = ReadObjects(workspace.Path); 323Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 324AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 333var other = directoryLink ? workspace.CreateDirectory("other-target").FullName : Path.Combine(workspace.Path, "other-target.txt"); 352Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 353AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 362await InitializeAsync(workspace.Path, objectFormat); 371await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 372var index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 373var objects = ReadObjects(workspace.Path); 384Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 385AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 392await InitializeAsync(workspace.Path, "sha1"); 399await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 400Assert.True(File.GetLastWriteTimeUtc(path) < File.GetLastWriteTimeUtc(Path.Combine(workspace.Path, ".git", "index"))); 401File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=reject\n"); 402await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail"); 403await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.required", "true"); 404var status = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "status", 407var index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 408var objects = ReadObjects(workspace.Path); 415Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 416AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 423await InitializeAsync(workspace.Path, "sha1"); 433await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/clean.keep"); 434Assert.True(File.GetLastWriteTimeUtc(clean) < File.GetLastWriteTimeUtc(Path.Combine(workspace.Path, ".git", "index"))); 435var log = Path.Combine(workspace.Path, "filter-pids"); 436File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=record\n*.keep filter=reject\n"); 437await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail"); 438await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.required", "true"); 445await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.record.clean", 447await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.record.required", "true"); 471await InitializeAsync(workspace.Path, "sha1"); 482await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.filemode", "false"); 484await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 487await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", "--chmod=+x", "--", "output/model.txt"); 488Assert.StartsWith("100755 ", await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/model.txt")); 490await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", hint, "--", "output/model.txt"); 491var index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 498await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", "--chmod=-x", "--", "output/model.txt"); 499Assert.StartsWith("100644 ", await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/model.txt")); 500index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 506var status = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "--no-optional-locks", "status", 515Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 526await InitializeAsync(workspace.Path, objectFormat); 527await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.symlinks", "true"); 529var target = Path.Combine(workspace.Path, "target.txt"); 533await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 534var entry = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--stage", "--", "output/model.txt"); 537Assert.Equal(canonicalTarget, await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "cat-file", "blob", entry.Split(' ')[1])); 540await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.symlinks", "false"); 543await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", hint, "--", "output/model.txt"); 545var index = File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index")); 546var objects = ReadObjects(workspace.Path); 565Assert.Equal(index, File.ReadAllBytes(Path.Combine(workspace.Path, ".git", "index"))); 566AssertObjectsEqual(objects, ReadObjects(workspace.Path)); 573await InitializeAsync(workspace.Path, "sha1"); 577await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/model.txt"); 595await InitializeAsync(workspace.Path, "sha1"); 601File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=reject\n"); 602await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail"); 603await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.required", "true");
Pipelines\PipelineOutputResolutionTests.cs (11)
24var artifact = Path.Combine(workspace.Path, "artifact.txt"); 27outputPath: workspace.Path, step: "publish-and-diff"); 62Assert.Equal(new(workspace.Path, "before"), comparison.Before); 63Assert.Equal(new(workspace.Path, "after"), comparison.After); 79outputPath: workspace.Path, step: "publish-and-diff"); 117await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 119var administration = Path.Combine(workspace.Path, ".git"); 130Directory.Move(administration, Path.Combine(workspace.Path, "saved-git")); 134await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init"); 188snapshotter.CaptureAsync(workspace.Path, cancellation.Token)); 194snapshotter.CaptureAsync(workspace.Path, cancellation.Token));
Pipelines\PipelineOutputSelectionTests.cs (93)
25await InitializeGitAsync(workspace.Path); 61await InitializeGitAsync(workspace.Path); 62await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 103await InitializeGitAsync(workspace.Path); 123await InitializeGitAsync(workspace.Path); 124var artifact = Write(workspace.Path, "artifact.txt"); 125Assert.True(File.Exists(Path.Combine(workspace.Path, ".git", "HEAD"))); 127var selected = await SelectAsync(new() { Mode = mode }, workspace.Path); 139await InitializeGitAsync(workspace.Path); 140Write(workspace.Path, ".gitignore", "*.tmp\n"); 146await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "-f", "--", "output/tracked.tmp"); 163await InitializeGitAsync(workspace.Path); 164Write(workspace.Path, ".gitignore", "output/ignored/\n"); 167await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "-f", "--", "output/ignored/child/model.json"); 195await InitializeGitAsync(workspace.Path); 196Write(workspace.Path, ".gitignore", "output/ignored*\n"); 200await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "-f", "--", "output/ignored/model.json"); 202var first = fileLink ? Write(workspace.Path, "first.txt", "same content") : workspace.CreateDirectory("first").FullName; 203var second = fileLink ? Write(workspace.Path, "second.txt", "same content") : workspace.CreateDirectory("second").FullName; 214Assert.Equal("output/ignored\n", (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 216Assert.Equal("output/ignored/model.json\0", await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 218Assert.Empty(await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 275await InitializeGitAsync(workspace.Path); 276await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 306await InitializeGitAsync(workspace.Path); 307await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 366await InitializeGitAsync(workspace.Path); 367await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 368var root = Path.Combine(workspace.Path, "output", "new"); 384await InitializeGitAsync(workspace.Path); 399Directory.Move(Path.Combine(workspace.Path, ".git"), Path.Combine(workspace.Path, "saved-git")); 400Assert.False(Directory.Exists(Path.Combine(workspace.Path, ".git"))); 416var artifact = Write(workspace.Path, "src/artifacts/model.json"); 417Write(workspace.Path, "src/artifacts/cache.tmp"); 418Write(workspace.Path, "src/Program.cs"); 419Write(workspace.Path, "README.md"); 420var special = Write(workspace.Path, "special.txt"); 421using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 439var selected = await SelectAsync(options, workspace.Path); 456using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 494using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path); 508var path = Write(workspace.Path, "artifact.TMP"); 514var selected = await SelectAsync(options, workspace.Path); 546await InitializeGitAsync(workspace.Path); 565await InitializeGitAsync(workspace.Path); 592await InitializeGitAsync(workspace.Path); 593Write(workspace.Path, ".gitignore", "*.tmp\n"); 597await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "-f", "--", "output/artifact.tmp", "output/visible.json"); 605var target = Write(workspace.Path, "external-target.json"); 624await InitializeGitAsync(workspace.Path); 626var sibling = Write(workspace.Path, "output-sibling/outside.json"); 627var outer = Write(workspace.Path, "outside.json"); 629await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "."); 641await InitializeGitAsync(workspace.Path); 673await InitializeGitAsync(workspace.Path); 679await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/child/model.txt"); 704await InitializeGitAsync(workspace.Path); 706await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/*.tmp\noutput/ignored/\n", TestContext.Current.CancellationToken); 713await PipelineOutputGitTestHelper.RunAsync(workspace.Path, ["add", "-f", "--", .. trackedPaths]); 717await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", "--split-index"); 718Assert.NotEmpty(Directory.GetFiles(Path.Combine(workspace.Path, ".git"), "sharedindex.*")); 721await PipelineOutputGitTestHelper.RunAsync(workspace.Path, ["update-index", "--skip-worktree", "--", .. trackedPaths]); 723(await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "-t", "-z")).Split('\0', StringSplitOptions.RemoveEmptyEntries).Order()); 726Write(workspace.Path, "excluded/model.json"); 727await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "excluded/model.json"); 728await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 730"-c", "core.hooksPath=" + Path.Combine(workspace.Path, ".git", "no-hooks"), 732await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "sparse-checkout", "set", "--cone", "--sparse-index", "output"); 733Assert.False(Directory.Exists(Path.Combine(workspace.Path, "excluded"))); 734Assert.Equal("040000", (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 743await PipelineOutputGitTestHelper.RunAsync(workspace.Path, ["add", "-f", "--", .. trackedPaths]); 744trees.Add((await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "write-tree")).Trim()); 747await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "read-tree", trees[1]); 748await PipelineOutputGitTestHelper.RunAsync(workspace.Path, ["read-tree", "-i", "-m", .. trees]); 750(await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "--unmerged", "--format=%(stage)", "-z")) 774await InitializeGitAsync(workspace.Path); 776var ignore = Write(workspace.Path, ignorePath, "*.tmp\n"); 777await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", ignorePath); 780Write(workspace.Path, "keep/model.json"); 781await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "keep/model.json"); 782await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 784"-c", "core.hooksPath=" + Path.Combine(workspace.Path, ".git", "no-hooks"), 786await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "sparse-checkout", "set", "--cone", "--sparse-index", "keep"); 791await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "core.sparseCheckout", "false"); 792await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", "--skip-worktree", "--", ignorePath); 794Assert.Equal("false", (await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "--bool", "core.sparseCheckout")).Trim()); 797Assert.Equal("S " + ignorePath + '\0', await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "ls-files", "-t", "-z", "--", ignorePath)); 827await InitializeGitAsync(workspace.Path); 833await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/nested/model.json"); 846var ordinaryGitSelection = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 876await InitializeGitAsync(workspace.Path); 880await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "update-index", "--add", "--cacheinfo",
Pipelines\PipelineOutputSnapshotterTests.cs (4)
335var first = Write(workspace.Path, "first.txt", "alpha"); 336var second = Write(workspace.Path, "second.txt", "beta"); 355var capture = await snapshotter.CaptureAsync(workspace.Path); 564var missingTarget = Path.Combine(workspace.Path, "missing.txt");
Pipelines\PipelineOutputStrategyTests.cs (45)
23var path = Path.Combine(workspace.Path, "artifact.txt"); 27var beforeSnapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 29var afterSnapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 41var artifact = Path.Combine(workspace.Path, "artifact.txt"); 43var metadata = Path.Combine(workspace.Path, metadataPath.Replace('/', Path.DirectorySeparatorChar)); 52var snapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 60snapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 65snapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 81var failure = await Assert.ThrowsAsync<DistributedApplicationException>(() => nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken)); 92var path = Path.Combine(workspace.Path, "artifact.txt"); 96var beforeSnapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 99var afterSnapshot = await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 112var missing = Path.Combine(workspace.Path, "missing"); 129var directory = Path.Combine(workspace.Path, "missing"); 160workspace.Path, runner, TestContext.Current.CancellationToken)); 181var failure = await Assert.ThrowsAsync<DistributedApplicationException>(() => nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken)); 191var path = Path.Combine(workspace.Path, "bad" + delimiter + "name.txt"); 208var target = directoryLink ? workspace.CreateDirectory("target").FullName : Path.Combine(workspace.Path, "target.txt"); 254var git = Assert.IsType<GitPipelineOutputReader>(await GitPipelineOutputReader.TryCreateAsync(workspace.Path, runner, TestContext.Current.CancellationToken)); 255var failure = await Assert.ThrowsAsync<DistributedApplicationException>(() => git.SelectFilesAsync(workspace.Path, PipelineOutputGitTestHelper.AllFilesMatcher(), TestContext.Current.CancellationToken)); 267var path = Path.Combine(workspace.Path, gitPath.Replace('/', Path.DirectorySeparatorChar)); 273await nativeSnapshotter.CaptureAsync(workspace.Path, TestContext.Current.CancellationToken); 294parents.Length == 0 ? workspace.Path : directory, runner, TestContext.Current.CancellationToken)); 416var git = new GitPipelineOutputReader(workspace.Path, runner); 425Assert.Empty(await git.SelectFilesAsync(workspace.Path, PipelineOutputGitTestHelper.AllFilesMatcher(), TestContext.Current.CancellationToken)); 452var git = new GitPipelineOutputReader(workspace.Path, runner); 455var fileHashes = await git.HashFilesAsync([new FileInfo(Path.Combine(workspace.Path, "artifact.txt"))], TestContext.Current.CancellationToken); 481var git = new GitPipelineOutputReader(workspace.Path, runner); 491await git.HashFilesAsync([new FileInfo(Path.Combine(workspace.Path, "artifact.txt"))], TestContext.Current.CancellationToken); 540var first = Path.Combine(workspace.Path, "first.txt"); 541var second = Path.Combine(workspace.Path, "second.txt"); 547var git = new GitPipelineOutputReader(workspace.Path, runner); 551var snapshot = await snapshotter.CaptureAsync(workspace.Path, PipelineOutputGitTestHelper.AllFilesMatcher(), git, TestContext.Current.CancellationToken); 559workspace.Path, PipelineOutputGitTestHelper.AllFilesMatcher(), git, TestContext.Current.CancellationToken)); 571await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init", "--object-format=sha1"); 576await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output/ignored-child/model.txt"); 577File.WriteAllText(Path.Combine(workspace.Path, ".gitignore"), "output/ignored-child*\n"); 584Assert.Equal("output/ignored-child/model.txt\0", await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 586Assert.Empty(await PipelineOutputGitTestHelper.RunAsync(workspace.Path, 588var status = await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "status", "--porcelain=v2", "-z", "--untracked-files=no", "--no-renames"); 630await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "init", "--object-format=sha1"); 635await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "add", "--", "output"); 638File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=reject\n"); 639await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.clean", "git pipeline-output-filter-must-fail"); 640await PipelineOutputGitTestHelper.RunAsync(workspace.Path, "config", "filter.reject.required", "true");
PublishAsDockerfileTests.cs (1)
527File.WriteAllText(Path.Join(workspace.Path, "Dockerfile"), "this does not matter");
Publishing\ContainerImageArchiveRewriterTests.cs (24)
20var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 21var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 105var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 106var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 181var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 182var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 221var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 222var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 240var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 241var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 313var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 314var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 334var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 335var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 356var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 357var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 380var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 381var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 413var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 414var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 435var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 436var destinationArchive = Path.Combine(workspace.Path, "destination.tar"); 459var sourceArchive = Path.Combine(workspace.Path, "source.tar"); 460var compressedArchive = Path.Combine(workspace.Path, "custom-extension.archive");
Utils\DotnetSdkVersionProviderTests.cs (27)
75workspace.Path, 81Assert.Equal(workspace.Path, processSpec.WorkingDirectory); 98workspace.Path, 120workspace.Path, 145workspace.Path, 170workspace.Path, 195workspace.Path, 231workspace.Path, 235workspace.Path, 239workspace.Path, 267workspace.Path, 271workspace.Path, 287File.WriteAllText(Path.Combine(workspace.Path, "global.json"), "{}"); 288var firstDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "src", "First")).FullName; 289var secondDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "src", "Second")).FullName; 309var firstDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "First")).FullName; 310var secondDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "Second")).FullName; 334var globalJsonPath = Path.Combine(workspace.Path, "global.json"); 342workspace.Path, 346workspace.Path, 364workspace.Path, 367workspace.Path, 384workspace.Path, 402workspace.Path, 406workspace.Path, 417workspace.Path, 436workspace.Path,
WithProcessCommandTests.cs (2)
1497var (executable, arguments) = await DotnetFileAppProcess.CreateInputRejectingProcessAsync(workspace.Path, exitCode, TestContext.Current.CancellationToken); 1557var appPath = DotnetFileAppProcess.WriteApp(workspace.Path, "blocked-input.cs", """
WithVolumeTests.cs (1)
112builder.Configuration[AspireStore.AspireStorePathKeyName] = workspace.Path;
Aspire.Hosting.TestUtilities (1)
tests\Shared\TemporaryWorkspace.cs (1)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire");
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (6)
171var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.Path); 186var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.Path); 200var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.Path); 212var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.Path); 216Assert.Contains(workspace.Path, annotation.ContextPath); 225var yarp = builder.AddYarp("yarp").WithStaticFiles(workspace.Path);
YarpConfigGeneratorTests.cs (2)
267using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 292var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml");