1325 references to Path
Aspire.Hosting.Azure.Kubernetes.Tests (6)
AzureKubernetesFoundryReferenceTests.cs (1)
51var 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)
31.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 (52)
AzureAppServiceTests.cs (9)
198var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "validate-appservice-config-env"); 239var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "validate-appservice-config-env"); 544var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 560var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 564var envBicepPath = Path.Combine(workspace.Path, "env", "env.bicep"); 568var apiBicepPath = Path.Combine(workspace.Path, "api", "api.bicep"); 740var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "publish-manifest"); 761Path.Combine(workspace.Path, "aspire-manifest.json"), 770var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path);
AzureBicepResourceTests.cs (4)
260var bicepFilePath = Path.Combine(workspace.Path, bicepFileName); 267var outputDir = Path.Combine(workspace.Path, "output"); 285var bicepFilePath = Path.Combine(workspace.Path, bicepFileName); 309var outputDir = Path.Combine(workspace.Path, "output");
AzureContainerAppEnvironmentExtensionsTests.cs (3)
552var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 565var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 569var envBicepPath = Path.Combine(workspace.Path, "env", "env.bicep");
AzureContainerAppsTests.cs (11)
1908var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "publish-manifest"); 1926await VerifyFile(Path.Combine(workspace.Path, "aspire-manifest.json")); 2030workspace.Path, 2060workspace.Path, 2180workspace.Path, 2206workspace.Path, 2235workspace.Path, 2264workspace.Path, 2720File.WriteAllText(Path.Combine(workspace.Path, "Dockerfile"), "FROM alpine"); 2722builder.AddDockerfile("with-bind-mount", workspace.Path) 2723.WithBindMount(workspace.Path, "/app/data");
AzureEnvironmentResourceTests.cs (16)
187workspace.Path); 202var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep")); 210using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 247var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep")); 256using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 263var outputPath = Path.Combine(workspace.Path, "exclude-main"); 285using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 292var outputPath = Path.Combine(workspace.Path, "write-main"); 352workspace.Path); 366var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 371var includedStorageBicepPath = Path.Combine(workspace.Path, "included-storage", "included-storage.bicep"); 375var excludedStorageBicepPath = Path.Combine(workspace.Path, "excluded-storage", "excluded-storage.bicep"); 385var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 397var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 410remoteInvokeOptions.StartInfo.WorkingDirectory = workspace.Path; 411RemoteExecutor.Invoke(RunTest, workspace.Path, remoteInvokeOptions).Dispose();
AzureFunctionsTests.cs (7)
650var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj"); 675var projectPath = Path.Combine(workspace.Path, "MyFunctions.csproj"); 697var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj"); 727var projectPath1 = Path.Combine(workspace.Path, "Functions1.csproj"); 728var projectPath2 = Path.Combine(workspace.Path, "Functions2.csproj"); 750var projectPath = Path.Combine(workspace.Path, "Functions.csproj"); 782var projectPath = Path.Combine(workspace.Path, "Functions.csproj");
AzureSandboxesTests.cs (2)
179workspace.Path); 186var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
Aspire.Hosting.Docker.Tests (114)
DockerComposePublisherTests.cs (83)
25var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 100var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 101var envPath = Path.Combine(workspace.Path, ".env"); 115var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 137var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 138var envPath = Path.Combine(workspace.Path, ".env"); 150using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path) 165var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 175using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "publish-docker-compose") 194var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 203var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 245var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 247var envPath = Path.Combine(workspace.Path, ".env"); 258var envFilePath = Path.Combine(workspace.Path, ".env"); 262var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 289var envFilePath = Path.Combine(workspace.Path, ".env"); 293var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 330var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 344var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 356var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 370var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 385var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 402var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 417var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 433var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 448var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 461var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 474var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 495var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 506var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 519var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 534var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 547var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 563var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 577var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 591var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 606var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 619var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 638var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 650var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 663var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 675var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, workspace.Path); 687var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 696var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 714var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 724var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 743var envFilePath = Path.Combine(workspace.Path, ".env.Staging"); 756var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 777var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 787var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 799var envFilePath = Path.Combine(workspace.Path, ".env.Production"); 820var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 833var envFilePath = Path.Combine(workspace.Path, ".env.Staging"); 850var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 866var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml")); 867var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 877var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 899var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 908var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "prepare-docker-compose"); 925var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 936var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 950var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 951var envPath = Path.Combine(workspace.Path, ".env"); 964var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 977var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 993var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1008var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1009var envPath = Path.Combine(workspace.Path, ".env"); 1021var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1036var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1047var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1072var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1073var envPath = Path.Combine(workspace.Path, ".env"); 1086var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1120var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1121var envPath = Path.Combine(workspace.Path, ".env"); 1140var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1154var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1155var envPath = Path.Combine(workspace.Path, ".env"); 1167var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1198var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1208var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1232var 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"); 148var outputPath = Path.Combine(workspace.Path, "output"); 175var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 187var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 199var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 221var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 235var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 260var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 320var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: step); 347var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 374var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Diagnostics); 422var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: step); 688var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "push-servicea"); 719var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: "push-servicea"); 756var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Diagnostics); 804var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Diagnostics); 964["OutputPath"] = workspace.Path, 966["ComposeFilePath"] = Path.Combine(workspace.Path, "docker-compose.yaml") 970var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Destroy); 1007var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Destroy); 1039var deployBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Deploy); 1063var destroyBuilder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path, step: WellKnownPipelineSteps.Destroy);
EnvFileTests.cs (6)
12var envFilePath = Path.Combine(workspace.Path, ".env"); 38var envFilePath = Path.Combine(workspace.Path, ".env"); 64var envFilePath = Path.Combine(workspace.Path, ".env"); 104var envFilePath = Path.Combine(workspace.Path, ".env"); 129var envFilePath = Path.Combine(workspace.Path, ".env"); 146var envFilePath = Path.Combine(workspace.Path, ".env");
Aspire.Hosting.Dotnet.Tests (230)
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 (188)
36options => options.ProjectDirectory = workspace.Path, 87options => options.ProjectDirectory = workspace.Path, 99var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 115options => options.ProjectDirectory = workspace.Path, 124var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 142options => options.ProjectDirectory = workspace.Path, 147var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 161options => options.ProjectDirectory = workspace.Path, 170var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 186options => options.ProjectDirectory = workspace.Path, 188var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 224options => options.ProjectDirectory = workspace.Path, 226var filePath = Path.Combine(workspace.Path, "worker.cs"); 261options => options.ProjectDirectory = workspace.Path, 263var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 264var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "worker")); 323options => options.ProjectDirectory = workspace.Path, 325var sharedProject = CreateSharedProject(workspace.Path); 326var firstPath = CreateFileApp(workspace.Path, "First", sharedProject); 327var secondPath = CreateFileApp(workspace.Path, "Second", sharedProject); 328var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt"); 329var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 394var appPath = Path.Combine(workspace.Path, "worker.cs"); 395var sentinelPath = Path.Combine(workspace.Path, "worker-ran.txt"); 399options => options.ProjectDirectory = workspace.Path, 476options => options.ProjectDirectory = workspace.Path, 478var firstProject = CreateProject(workspace.Path, "First's Project", "First.csproj"); 479var secondProject = CreateProject(workspace.Path, "Second", "Second.csproj"); 504using var builder = TestDistributedApplicationBuilder.Create(options => options.ProjectDirectory = workspace.Path, outputHelper); 505var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj"); 507var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 527workspace.Path, 528Path.Combine(workspace.Path, "obj", ".aspire", "build"), 530var projectPath = CreateProject(workspace.Path, "Service", "App.csproj"); 531var caseVariantPath = Path.Combine(workspace.Path, "service", "app.CSPROJ"); 535CreateProject(workspace.Path, "service", "app.CSPROJ"); 558options => options.ProjectDirectory = workspace.Path, 560var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj"); 562var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 563var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 615options => options.ProjectDirectory = workspace.Path, 617var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 618var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 638options => options.ProjectDirectory = workspace.Path, 640var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 641var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 661options => options.ProjectDirectory = workspace.Path, 663var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 664var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 690options => options.ProjectDirectory = workspace.Path, 692var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 693var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 712options => options.ProjectDirectory = workspace.Path, 714var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 715var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 738options => options.ProjectDirectory = workspace.Path, 756var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 776options => options.ProjectDirectory = workspace.Path, 778var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 805options => options.ProjectDirectory = workspace.Path, 807var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 839options => options.ProjectDirectory = workspace.Path, 841var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 879options => options.ProjectDirectory = workspace.Path, 881var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 950options => options.ProjectDirectory = workspace.Path, 952var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 953var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 980options => options.ProjectDirectory = workspace.Path, 982var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1003options => options.ProjectDirectory = workspace.Path, 1005var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1025options => options.ProjectDirectory = workspace.Path, 1027var appPath = Path.Combine(workspace.Path, "app.cs"); 1045options => options.ProjectDirectory = workspace.Path, 1047var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1086options => options.ProjectDirectory = workspace.Path, 1088var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1211options => options.ProjectDirectory = workspace.Path, 1213var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1292options => options.ProjectDirectory = workspace.Path, 1294var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1343options => options.ProjectDirectory = workspace.Path, 1345var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1413options => options.ProjectDirectory = workspace.Path, 1415var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1442options => options.ProjectDirectory = workspace.Path, 1444var apiPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 1445var workerPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1483options => options.ProjectDirectory = workspace.Path, 1485var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1487var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName; 1488var sdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime")).FullName; 1532options => options.ProjectDirectory = workspace.Path, 1534var projectPath = CreateProject(workspace.Path, "Worker", "Worker.csproj"); 1536var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-1")).FullName; 1537var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-2")).FullName; 1577options => options.ProjectDirectory = workspace.Path, 1579var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName; 1583var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName; 1602options => options.ProjectDirectory = workspace.Path, 1605Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName, 1609var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "foreign")).FullName; 1637options => options.ProjectDirectory = workspace.Path, 1639var activePath = CreateProject(workspace.Path, "Active", "Active.csproj"); 1640var removedPath = CreateProject(workspace.Path, "Removed", "Removed.csproj"); 1661options => options.ProjectDirectory = workspace.Path, 1663var activePath = CreateProject(workspace.Path, "Active", "Active.csproj"); 1664var replacedPath = CreateProject(workspace.Path, "Replaced", "Replaced.csproj"); 1671@event.Model.Resources[index] = new ExecutableResource(replaced.Resource.Name, "dotnet", workspace.Path); 1687options => options.ProjectDirectory = workspace.Path, 1689var projectPath = CreateProject(workspace.Path, "Project", "Project.csproj"); 1690var filePath = Path.Combine(workspace.Path, "worker.cs"); 1732options => options.ProjectDirectory = workspace.Path, 1734var firstPath = CreateProject(workspace.Path, "First", "First.csproj"); 1735var secondPath = CreateProject(workspace.Path, "Second", "Second.csproj"); 1777options => options.ProjectDirectory = workspace.Path, 1779var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "Physical")); 1789var linkPath = Path.Combine(workspace.Path, "Alias"); 1800var otherProjectPath = CreateProject(workspace.Path, "Other", "Other.csproj"); 1827options => options.ProjectDirectory = workspace.Path, 1829var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1851options => options.ProjectDirectory = workspace.Path, 1853var removedProjectPath = CreateProject(workspace.Path, "Removed", "Removed.csproj"); 1860var activeProjectPath = CreateProject(workspace.Path, "Active", "Active.csproj"); 1881options => options.ProjectDirectory = workspace.Path, 1883var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1911options => options.ProjectDirectory = workspace.Path, 1913var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1944options => options.ProjectDirectory = workspace.Path, 1946var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 1977options => options.ProjectDirectory = workspace.Path, 1979var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 2002options => options.ProjectDirectory = workspace.Path, 2004var projectPath = CreateProject(workspace.Path, "Service", "Service.csproj"); 2005var removedPath = CreateProject(workspace.Path, "Removed", "Removed.csproj"); 2006var missingPath = Path.Combine(workspace.Path, "Missing", "Missing.csproj"); 2029options => options.ProjectDirectory = workspace.Path, 2031var firstPath = CreateProject(workspace.Path, "First", "First.csproj"); 2032var secondPath = CreateProject(workspace.Path, "Second", "Second.csproj"); 2082options => options.ProjectDirectory = workspace.Path, 2084var projectPath = CreateProject(workspace.Path, "Service", "App.csproj"); 2085var linkDirectory = Path.Combine(workspace.Path, "ServiceAlias"); 2124workspace.Path, 2125Path.Combine(workspace.Path, "obj", ".aspire", "build"), 2127buildResource.AddProject(CreateProject(workspace.Path, "Api", "Api.csproj")); 2162var sharedProject = CreateSharedProject(workspace.Path); 2163var apiProject = CreateConsoleProject(workspace.Path, "Api", sharedProject); 2164var workerProject = CreateConsoleProject(workspace.Path, "Worker", sharedProject); 2165var apiSentinel = Path.Combine(workspace.Path, "api-ran.txt"); 2166var workerSentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 2169options => options.ProjectDirectory = workspace.Path, 2207var firstProject = CreateSentinelProject(workspace.Path, "First", """ 2212var secondProject = CreateSentinelProject(workspace.Path, "Second", """ 2218var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt"); 2219var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 2222options => options.ProjectDirectory = workspace.Path, 2262var brokenProject = CreateBrokenProject(workspace.Path, "FIRST_BUILD_FAILED"); 2263var secondBuildMarker = Path.Combine(workspace.Path, "second-built.txt"); 2264var secondProject = CreateSentinelProject(workspace.Path, "Second", $$""" 2269var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 2272options => options.ProjectDirectory = workspace.Path, 2317var validProject = CreateProjectFile(workspace.Path, "Valid", """ 2328var sentinelPath = Path.Combine(workspace.Path, "valid-ran.txt"); 2329var missingProject = Path.Combine(workspace.Path, "Missing", "Missing.csproj"); 2332options => options.ProjectDirectory = workspace.Path, 2372options => options.ProjectDirectory = workspace.Path, 2380var missingPath = Path.Combine(workspace.Path, "Missing", $"Missing.{extension}"); 2405var projectPath = CreateProjectFile(workspace.Path, "EnvironmentBuild", """ 2428var sentinelPath = Path.Combine(workspace.Path, "environment-build-ran.txt"); 2441options => options.ProjectDirectory = workspace.Path, 2479var projectPath = CreateProjectWithBuildProducedRunPropertiesSentinel(workspace.Path); 2482options => options.ProjectDirectory = workspace.Path, 2535var projectPath = CreateProject(workspace.Path, "Api", "Api.csproj"); 2536var filePath = Path.Combine(workspace.Path, "worker.cs"); 2539options => options.ProjectDirectory = workspace.Path, 2593var projectPath = CreateProject(workspace.Path, "EnvironmentBuild", "EnvironmentBuild.csproj"); 2596options => options.ProjectDirectory = workspace.Path, 2602Path.Combine(workspace.Path, "missing-dotnet"); 2637var brokenProject = CreateBrokenProject(workspace.Path, buildLogMarker); 2638var fileApp = Path.Combine(workspace.Path, "worker.cs"); 2639var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 2649options => options.ProjectDirectory = workspace.Path, 2700var releaseBuild = Path.Combine(workspace.Path, "release-build"); 2701var brokenProject = CreateGatedBrokenProject(workspace.Path, releaseBuild); 2702var fileApp = Path.Combine(workspace.Path, "worker.cs"); 2703var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 2713options => options.ProjectDirectory = workspace.Path,
DotnetProjectResourceTests.cs (30)
117"project" => CreateFile(workspace.Path, "MyService.csproj"), 118"directory" => CreateProjectDirectory(workspace.Path), 119"file" => CreateFile(workspace.Path, "service.cs"), 127() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 138var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 155workspace.Path, 157builder.AddDotnetProject("svc", CreateFile(workspace.Path, "MyService.csproj"), o => o.ExcludeLaunchProfile = true); 163Assert.False(File.Exists(Path.Combine(workspace.Path, "aspire-manifest.json"))); 173builder.AddDotnetProject("svc", CreateFile(workspace.Path, "MyService.csproj"), o => o.ExcludeLaunchProfile = true); 205builder.AddDotnetProject("svc", CreateFile(workspace.Path, "MyService.csproj"), o => o.ExcludeLaunchProfile = true); 246builder.AddDotnetProject("svc", CreateFile(workspace.Path, "MyService.csproj"), o => o.ExcludeLaunchProfile = true); 276builder.AddDotnetProject("svc", CreateFile(workspace.Path, "MyService.csproj"), o => o.ExcludeLaunchProfile = true); 303builder.AddDotnetProject("svc", CreateFile(workspace.Path, "MyService.csproj"), o => o.ExcludeLaunchProfile = true); 331builder.AddResource(new DotnetProjectResource("svc", workspace.Path)); 343builder.AddDotnetProject("api", CreateFile(workspace.Path, "Api.csproj"), o => o.ExcludeLaunchProfile = true); 344builder.AddDotnetProject("worker", CreateFile(workspace.Path, "Worker.csproj"), o => o.ExcludeLaunchProfile = true); 345builder.AddDotnetProject("excluded", CreateFile(workspace.Path, "Excluded.csproj"), o => o.ExcludeLaunchProfile = true) 347builder.AddDotnetProject("containerized", CreateFile(workspace.Path, "Containerized.csproj"), o => o.ExcludeLaunchProfile = true) 363var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 371var manifest = await ManifestUtils.GetManifestOrNull(resource.Resource, workspace.Path); 379var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 387var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.Path); 395var projectPath = CreateFile(workspace.Path, "MyService.csproj"); 396await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch"); 405var manifest = await ManifestUtils.GetManifest(resource.Resource, workspace.Path); 430var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 448var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "AmbiguousService")); 498var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 601var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 671var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
DotnetProjectRunPropertiesResolverTests.cs (5)
20var projectPath = Path.Combine(workspace.Path, "Broken.csproj"); 39workspace.Path, 55var projectPath = Path.Combine(workspace.Path, "Warning.csproj"); 73workspace.Path, 77Assert.Equal(new("dotnet", "exec app.dll", Path.Combine(workspace.Path, "bin")), result);
Aspire.Hosting.Go.Tests (11)
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)
48Directory.CreateDirectory(Path.Combine(workspace.Path, "build", "libs")); 52await File.WriteAllTextAsync(Path.Combine(workspace.Path, "build", "libs", "reports service.jar"), ""); 54var destination = Path.Combine(workspace.Path, "app.jar"); 60WorkingDirectory = workspace.Path,
Aspire.Hosting.JavaScript.Tests (486)
AddBunAppTests.cs (31)
34using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 36var appDir = Path.Combine(workspace.Path, "js"); 46await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 48var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 62using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 64var appDir = Path.Combine(workspace.Path, "js"); 73await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 75await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"))); 82using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 84var appDir = Path.Combine(workspace.Path, "js"); 90await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 95var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 113using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 115var appDir = Path.Combine(workspace.Path, "js"); 121await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 123var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 133await ManifestUtils.GetManifest(bunApp.Resource, workspace.Path); 145File.WriteAllText(Path.Combine(workspace.Path, "server.ts"), "console.log('hi');"); 149builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 167File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 171builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 219var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 311var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 324var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 336var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts") 351File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 353var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts") 366var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts"); 373Assert.Equal(Path.GetFullPath("server.ts", workspace.Path), launchConfig.ScriptPath); 384File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 386var bunApp = builder.AddBunApp("bunapp", workspace.Path, "server.ts")
AddDenoAppTests.cs (221)
61using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 63var appDir = Path.Combine(workspace.Path, "js"); 73await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 75var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 89using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 91var appDir = Path.Combine(workspace.Path, "js"); 100await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 102var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 112using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 114var appDir = Path.Combine(workspace.Path, "js"); 120await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 125var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 144using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 146var appDir = Path.Combine(workspace.Path, "js"); 151await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 153var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 179using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 181var appDir = Path.Combine(workspace.Path, "js"); 188await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 190var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 199using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 201var appDir = Path.Combine(workspace.Path, "js"); 211await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 213var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 223using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 225var appDir = Path.Combine(workspace.Path, "js"); 237await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 239await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"))); 246using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 248var appDir = Path.Combine(workspace.Path, "js"); 255await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 257var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 266using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 268var appDir = Path.Combine(workspace.Path, "js"); 280await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 282var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 293using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 295var appDir = Path.Combine(workspace.Path, "js"); 304await ManifestUtils.GetManifest(app.Resource, workspace.Path); 306var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 319using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 321var appDir = Path.Combine(workspace.Path, "js"); 335await ManifestUtils.GetManifest(app.Resource, workspace.Path); 337var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 350using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 352var appDir = Path.Combine(workspace.Path, "js"); 359() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 370using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 372var appDir = Path.Combine(workspace.Path, "js"); 379() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 390using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 392var appDir = Path.Combine(workspace.Path, "js"); 400await ManifestUtils.GetManifest(app.Resource, workspace.Path); 402var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile")); 414using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 416var appDir = Path.Combine(workspace.Path, "js"); 425await ManifestUtils.GetManifest(app.Resource, workspace.Path); 427var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile")); 439using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 441var appDir = Path.Combine(workspace.Path, "js"); 445await ManifestUtils.GetManifest(app.Resource, workspace.Path); 447var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 457using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 459var appDir = Path.Combine(workspace.Path, "js"); 464await ManifestUtils.GetManifest(app.Resource, workspace.Path); 466var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 476using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 478var appDir = Path.Combine(workspace.Path, "js"); 485await ManifestUtils.GetManifest(app.Resource, workspace.Path); 487var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 503using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 505var appDir = Path.Combine(workspace.Path, "js"); 512() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 522using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 524var appDir = Path.Combine(workspace.Path, "js"); 531await ManifestUtils.GetManifest(app.Resource, workspace.Path); 533Assert.False(File.Exists(Path.Combine(workspace.Path, "js.Dockerfile"))); 540using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 542var appDir = Path.Combine(workspace.Path, "js"); 552await ManifestUtils.GetManifest(app.Resource, workspace.Path); 554var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 567using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 569var appDir = Path.Combine(workspace.Path, "js"); 583await ManifestUtils.GetManifest(app.Resource, workspace.Path); 585var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 610using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 612var appDir = Path.Combine(workspace.Path, "js"); 619await ManifestUtils.GetManifest(app.Resource, workspace.Path); 623var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 631using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 633var appDir = Path.Combine(workspace.Path, "js"); 640await ManifestUtils.GetManifest(app.Resource, workspace.Path); 644var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 652using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 654var appDir = Path.Combine(workspace.Path, "js"); 663await ManifestUtils.GetManifest(app.Resource, workspace.Path); 665var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 674using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 676var appDir = Path.Combine(workspace.Path, "js"); 685await ManifestUtils.GetManifest(app.Resource, workspace.Path); 688var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 696using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 698var appDir = Path.Combine(workspace.Path, "js"); 707await ManifestUtils.GetManifest(app.Resource, workspace.Path); 709var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 725using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 727var appDir = Path.Combine(workspace.Path, "js"); 745await ManifestUtils.GetManifest(app.Resource, workspace.Path); 747var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 756using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 758var appDir = Path.Combine(workspace.Path, "js"); 766await ManifestUtils.GetManifest(app.Resource, workspace.Path); 768var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 860using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 862var appDir = Path.Combine(workspace.Path, "js"); 872await ManifestUtils.GetManifest(app.Resource, workspace.Path); 874var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 884using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 886var appDir = Path.Combine(workspace.Path, "js"); 893await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 895var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 903using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 905var appDir = Path.Combine(workspace.Path, "js"); 912await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 914var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 922using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 924var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 927var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.Path)); 936using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 938var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 942var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ManifestUtils.GetManifest(denoApp.Resource, workspace.Path)); 951using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 953var appDir = Path.Combine(workspace.Path, "js"); 960await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 962var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 972using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 974var appDir = Path.Combine(workspace.Path, "js"); 983await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 985var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 995using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 997var appDir = Path.Combine(workspace.Path, "js"); 1004await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1006var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1021using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1023var appDir = Path.Combine(workspace.Path, "js"); 1029await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1031var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1039using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1041var appDir = Path.Combine(workspace.Path, "js"); 1048await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1050var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1060using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1062var appDir = Path.Combine(workspace.Path, "js"); 1069await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1071var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1081using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1083var appDir = Path.Combine(workspace.Path, "js"); 1092var manifest = await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1095var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1107var appDir = Path.Combine(workspace.Path, "js"); 1125var appDir = Path.Combine(workspace.Path, "js"); 1152var appDir = Path.Combine(workspace.Path, "js"); 1181var appDir = Path.Combine(workspace.Path, "js"); 1200var appDir = Path.Combine(workspace.Path, "js"); 1227using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1229var appDir1 = Path.Combine(workspace.Path, "js1"); 1230var appDir2 = Path.Combine(workspace.Path, "js2"); 1242await ManifestUtils.GetManifest(denoApp2.Resource, workspace.Path); 1244var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js2.Dockerfile")); 1254File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');"); 1258builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1276File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 1280builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1303File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 1307builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1325File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');"); 1328builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 1493builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 1508var app = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 1525var app = builder.AddJavaScriptApp("js", workspace.Path) 1542var app = builder.AddJavaScriptApp("js", workspace.Path) 1560builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 1577using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1579var appDir = Path.Combine(workspace.Path, "js"); 1586await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1588var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1601using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1603var appDir = Path.Combine(workspace.Path, "js"); 1611await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1613var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1628using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1630var appDir = Path.Combine(workspace.Path, "js"); 1637await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1639var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1648using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1650var appDir = Path.Combine(workspace.Path, "js"); 1656await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 1658var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1683using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 1685var appDir = Path.Combine(workspace.Path, "js"); 1692() => ManifestUtils.GetManifest(denoApp.Resource, workspace.Path)); 2296var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2336var exception = Assert.Throws<ArgumentException>(() => builder.AddDenoApp("denoapp", workspace.Path, scriptPath)); 2347using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 2349var appDir = Path.Combine(workspace.Path, "deno-app"); 2358await ManifestUtils.GetManifest(denoApp.Resource, workspace.Path); 2360var dockerfilePath = Path.Combine(workspace.Path, "deno-app.Dockerfile"); 2530var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2543var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2555var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2569var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts"); 2576Assert.Equal(Path.GetFullPath("main.ts", workspace.Path), launchConfig.ScriptPath); 2587File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2589var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2605File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2607var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2624File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2626var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2643var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2659var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts") 2678var denoApp = builder.AddDenoApp("denoapp", workspace.Path, "main.ts");
AddJavaScriptAppTests.cs (80)
25using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 27var appDir = Path.Combine(workspace.Path, "js"); 34await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 36var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 47using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 49var appDir = Path.Combine(workspace.Path, "js"); 57await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 59var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 67using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 69var appDir = Path.Combine(workspace.Path, "js"); 77await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 79var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 87using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 89var appDir = Path.Combine(workspace.Path, "js"); 97await ManifestUtils.GetManifest(yarnApp.Resource, workspace.Path); 99var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 109using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 112var appDir = Path.Combine(workspace.Path, "js"); 124await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 126var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 136using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 138var appDir = Path.Combine(workspace.Path, "js"); 145await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 147var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 170using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 172var appDir = Path.Combine(workspace.Path, "js"); 185await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 187var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 197using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 199var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 203var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 214using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 216var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 222var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifestForModel(appModel, workspace.Path)); 233using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 235var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 240var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 254var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 278using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 280var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 284var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 293using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 295var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 302var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 312using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 314var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 321var manifest = await ManifestUtils.GetManifest(app.Resource, workspace.Path); 330using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 332var appDir = CreateJavaScriptAppWithDockerfile(workspace.Path); 337var exception = await Assert.ThrowsAsync<DistributedApplicationException>(() => ManifestUtils.GetManifest(app.Resource, workspace.Path)); 348using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 350var appDir = Path.Combine(workspace.Path, "js"); 359await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 361var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 379using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 381var appDir = Path.Combine(workspace.Path, "js"); 395await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 397var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 413using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 415var appDir = Path.Combine(workspace.Path, "js"); 430await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 432var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 445using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 447var appDir = Path.Combine(workspace.Path, "js"); 461await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 463var 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"); 490await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 492var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 513using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 515var appDir = Path.Combine(workspace.Path, "js"); 539using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 542var appDir = Path.Combine(workspace.Path, "pnpm-app"); 562await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 564var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile"); 635using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 637var appDir = Path.Combine(workspace.Path, "pnpm-app"); 658await ManifestUtils.GetManifest(pnpmApp.Resource, workspace.Path); 660var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile");
AddNodeAppTests.cs (28)
99using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 101var appDir = Path.Combine(workspace.Path, "js"); 112await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 114var dockerfilePath = 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"); 181await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 183var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 214using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 216var appDir = Path.Combine(workspace.Path, "js"); 226await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 229var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 238File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "{}"); 242builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 265File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 269builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 442var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 455var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 467var viteApp = builder.AddViteApp("viteapp", workspace.Path); 480var viteApp = builder.AddViteApp("viteapp", workspace.Path) 507var viteApp = builder.AddViteApp("viteapp", workspace.Path) 524var viteApp = builder.AddViteApp("viteapp", workspace.Path) 541var resource = new JavaScriptAppResource("jsapp", "npm", workspace.Path); 562File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "console.log('hello');"); 564var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js") 600var nodeApp = builder.AddNodeApp("nodeapp", workspace.Path, "app.js"); 607Assert.Equal(Path.GetFullPath("app.js", workspace.Path), launchConfig.ScriptPath); 616var viteApp = builder.AddViteApp("viteapp", workspace.Path);
AddViteAppTests.cs (101)
25using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 28var viteDir = Path.Combine(workspace.Path, "vite"); 37var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 63var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 87using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 89var viteDir = Path.Combine(workspace.Path, "vite"); 97await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 99var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 113using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 115var viteDir = Path.Combine(workspace.Path, "vite"); 119var apiDir = Path.Combine(workspace.Path, "api"); 130await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 132var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 140using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 142var viteDir = Path.Combine(workspace.Path, "vite"); 161using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 163var viteDir = Path.Combine(workspace.Path, "vite"); 167var apiDir = Path.Combine(workspace.Path, "api"); 191using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 193var appDir = Path.Combine(workspace.Path, "angular"); 201await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 203var dockerfilePath = Path.Combine(workspace.Path, "angular.Dockerfile"); 217using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 219var appDir = Path.Combine(workspace.Path, "vite"); 227await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 229var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 240using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 242var nextDir = Path.Combine(workspace.Path, "nextjs"); 249await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 251var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile"); 261using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 263var nextDir = Path.Combine(workspace.Path, "nextjs"); 270await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 272var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile"); 280using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 282var appDir = Path.Combine(workspace.Path, "nuxt"); 290await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 292var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile"); 300using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 302var appDir = Path.Combine(workspace.Path, "nuxt"); 310await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 312var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile"); 322File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), "18.20.0"); 324using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 325var nodeApp = builder.AddViteApp("vite", workspace.Path) 328var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 330var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 342File.WriteAllText(Path.Combine(workspace.Path, ".node-version"), "v21.5.0"); 344using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 345var nodeApp = builder.AddViteApp("vite", workspace.Path) 348var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 350var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 367File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions); 369using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 370var nodeApp = builder.AddViteApp("vite", workspace.Path) 373var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 375var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 393File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions); 395using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 396var nodeApp = builder.AddViteApp("vite", workspace.Path) 399var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 401var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 419File.WriteAllText(Path.Combine(workspace.Path, "package.json"), packageJson); 421using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 422var nodeApp = builder.AddViteApp("vite", workspace.Path) 425var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 427var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 438using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 439var nodeApp = builder.AddViteApp("vite", workspace.Path) 442var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 444var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 460File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), versionString); 462using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 463var nodeApp = builder.AddViteApp("vite", workspace.Path) 466var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 468var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 477using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: workspace.Path).WithResourceCleanUp(true); 480var nodeApp = builder.AddViteApp("vite", workspace.Path) 484var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, workspace.Path); 490var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 548Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 551var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 555var viteApp = builder.AddViteApp("test-app", workspace.Path) 609Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 612var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 616var viteApp = builder.AddViteApp("test-app", workspace.Path); 668var viteApp = builder.AddViteApp("test-app", workspace.Path); 713var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 717builder.AddViteApp("test-app", workspace.Path); 756Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 759var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 763var viteApp = builder.AddViteApp("test-app", workspace.Path); 811var repoRoot = Path.Combine(workspace.Path, "repo"); 887var repoRoot = Path.Combine(workspace.Path, "repo"); 950var repoRoot = Path.Combine(workspace.Path, "repo"); 996Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 999var viteConfigPath = Path.Combine(workspace.Path, configFileName); 1003var viteApp = builder.AddViteApp("test-app", workspace.Path); 1050var nextDir = Path.Combine(workspace.Path, "nextjs"); 1066var nextDir = Path.Combine(workspace.Path, "nextjs"); 1083var 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)
30var app = builder.AddNodeApp("app", workspace.Path, "server.js"); 42var app = builder.AddNodeApp("app", workspace.Path, "server.js") 54var app = builder.AddNodeApp("app", workspace.Path, "server.js") 67var app = builder.AddNodeApp("app", workspace.Path, "server.js") 158File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 160var app = builder.AddBunApp("app", workspace.Path, "server.ts"); 171File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 173var app = builder.AddDenoApp("app", workspace.Path, "server.ts"); 184var app = builder.AddDenoApp("app", workspace.Path, "server.ts") 197var 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 (228)
KubernetesDeployTests.cs (58)
309workspace.Path, 350workspace.Path, 390workspace.Path, 431workspace.Path, 471workspace.Path, 506workspace.Path, 542workspace.Path, 566workspace.Path, 591workspace.Path, 798var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 832var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 846var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml")); 859var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 877var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml")); 890var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 899var deploymentYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", "svc", "deployment.yaml")); 913workspace.Path, 940var outputPath = Path.Combine(workspace.Path, "env"); 987var outputPath = Path.Combine(workspace.Path, "env"); 1007var outputPath = Path.Combine(workspace.Path, "env"); 1081var outputPath = Path.Combine(workspace.Path, "env"); 1132workspace.Path, 1165workspace.Path, 1238var outputPath = Path.Combine(workspace.Path, "env"); 1288var outputPath = Path.Combine(workspace.Path, "env"); 1311workspace.Path, 1337var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1360var serverSecretsTemplatePath = Path.Combine(workspace.Path, "templates", "server", "secrets.yaml"); 1382workspace.Path, 1412var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1439var outputPath = Path.Combine(workspace.Path, "deploy"); 1501workspace.Path, 1527workspace.Path, env, CancellationToken.None); 1529var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1555workspace.Path, 1588workspace.Path, env, CancellationToken.None); 1590var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1601workspace.Path, 1633workspace.Path, env, CancellationToken.None); 1635var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1646workspace.Path, 1673workspace.Path, env, CancellationToken.None); 1675var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 1676await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1678await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates", "myapp", "config.yaml")), 1738workspace.Path, 1753var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1775workspace.Path, 1792var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1810workspace.Path, 1827var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1846workspace.Path, 1863var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1904workspace.Path, 1935workspace.Path, 1975workspace.Path, 2020workspace.Path, 2068workspace.Path,
KubernetesEnvironmentResourceTests.cs (5)
19using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 29var chartYaml = Path.Combine(workspace.Path, "Chart.yaml"); 30var valuesYaml = Path.Combine(workspace.Path, "values.yaml"); 31var deploymentYaml = Path.Combine(workspace.Path, "templates", "service", "deployment.yaml"); 95var 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 (84)
23var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 71var filePath = Path.Combine(workspace.Path, expectedFile); 91var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 110var deploymentPath = Path.Combine(workspace.Path, "templates/service/deployment.yaml"); 122var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 168var filePath = Path.Combine(workspace.Path, expectedFile); 188var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 212var manifestPath = Path.Combine(workspace.Path, "templates/myapp/scaler.yaml"); 254var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 290var filePath = Path.Combine(workspace.Path, expectedFile); 310var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 346var filePath = Path.Combine(workspace.Path, expectedFile); 366var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 378var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 389var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 453var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 463var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 502var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 512var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 537var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 547var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 630var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 690var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 726var filePath = Path.Combine(workspace.Path, expectedFile); 746var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 772var filePath = Path.Combine(workspace.Path, expectedFile); 790var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 816var filePath = Path.Combine(workspace.Path, expectedFile); 834var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 842var servicePath = Path.Combine(workspace.Path, "templates/database/service.yaml"); 855var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 878var filePath = Path.Combine(workspace.Path, expectedFile); 905var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 930var filePath = Path.Combine(workspace.Path, expectedFile); 953var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 975var filePath = Path.Combine(workspace.Path, expectedFile); 993var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1020var filePath = Path.Combine(workspace.Path, expectedFile); 1040var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1066var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1092var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1116var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1152var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1175var filePath = Path.Combine(workspace.Path, expectedFile); 1195var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1221var filePath = Path.Combine(workspace.Path, expectedFile); 1241var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1282var filePath = Path.Combine(workspace.Path, expectedFile); 1302var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1333var filePath = Path.Combine(workspace.Path, expectedFile); 1353var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1395var filePath = Path.Combine(workspace.Path, expectedFile); 1415var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1454var filePath = Path.Combine(workspace.Path, expectedFile); 1474var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1508var filePath = Path.Combine(workspace.Path, expectedFile); 1538var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1565var filePath = Path.Combine(workspace.Path, expectedFile); 1584var legacyPv = Path.Combine(workspace.Path, "templates", "service", "data-pv.yaml"); 1599var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1614var deploymentPath = Path.Combine(workspace.Path, "templates", "service", "deployment.yaml"); 1632var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1659var filePath = Path.Combine(workspace.Path, expectedFile); 1672var legacyPvc = Path.Combine(workspace.Path, "templates", "service", "data-pvc.yaml"); 1676var deploymentPath = Path.Combine(workspace.Path, "templates", "service", "deployment.yaml"); 1689var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1714var filePath = Path.Combine(workspace.Path, expectedFile); 1732var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1750var statefulSetPath = Path.Combine(workspace.Path, "templates", "api", "statefulset.yaml"); 1760var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1777var statefulSetPath = Path.Combine(workspace.Path, "templates", "api", "statefulset.yaml"); 1797var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1828var filePath = Path.Combine(workspace.Path, expectedFile); 1846var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1878var filePath = Path.Combine(workspace.Path, expectedFile); 1900var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1916var statefulSetPath = Path.Combine(workspace.Path, "templates", "service", "statefulset.yaml"); 1922var pvcPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 1940var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1971var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 1986var statefulSetPath = Path.Combine(workspace.Path, "templates", "api", "statefulset.yaml"); 2033var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, workspace.Path); 2060var pvcPath = Path.Combine(workspace.Path, "templates", "data", "data.yaml"); 2072var valuesPath = Path.Combine(workspace.Path, "values.yaml");
Aspire.Hosting.Maui.Tests (64)
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 (3)
26var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 53var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 76var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiPlatformExtensionsTests.cs (38)
98var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 121var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 141var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 160var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 189var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 237var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 256var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 280var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 309var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 335var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 358var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 381var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 404var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 432var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 457var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 486var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 511var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 538var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 565var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 632var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 662var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 686var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 709var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 747var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 800var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 865var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 904var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 957var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1023var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1060var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1077var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1099var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1130var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1157var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1187var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1269var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1305var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 1368var 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 (2)
AddMySqlTests.cs (1)
262builder.Configuration["Aspire:Store:Path"] = workspace.Path;
MySqlFunctionalTests.cs (1)
572.WithTempAspireStore(workspace.Path)
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (2)
481builder.Configuration["Aspire:Store:Path"] = workspace.Path; 543builder.Configuration["Aspire:Store:Path"] = workspace.Path;
PostgresFunctionalTests.cs (1)
559.WithTempAspireStore(workspace.Path)
Aspire.Hosting.Python.Tests (109)
AddPythonAppTests.cs (109)
397builder.AddPythonApp("pythonProject", workspace.Path, "main.py")); 410builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 419var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 443builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 483var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 502var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 557options.ProjectDirectory = workspace.Path; 603options.ProjectDirectory = workspace.Path; 677options.ProjectDirectory = workspace.Path; 732var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 742var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 763var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 783builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 821var pythonBuilder = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 841var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 865var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 896var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 923var pythonBuilder = builder.AddPythonApp("python-script", workspace.Path, "main.py"); 942var pythonBuilder = builder.AddPythonModule("flask-app", workspace.Path, "flask"); 961var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.Path, "pytest"); 982builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 992var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1018builder.AddPythonModule("pythonProject", workspace.Path, moduleName); 1026var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1052builder.AddPythonExecutable("pythonProject", workspace.Path, executableName); 1060var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1083var pythonBuilder = builder.AddPythonModule("flask-app", workspace.Path, "flask") 1107var pythonBuilder = builder.AddPythonApp("python-app", workspace.Path, "main.py") 1129var pythonBuilder = builder.AddPythonExecutable("pytest", workspace.Path, "pytest") 1151var pythonBuilder = builder.AddPythonApp("python-app", workspace.Path, "main.py") 1181var pythonBuilder = builder.AddPythonApp("python-app", workspace.Path, "main.py"); 1228var resourceBuilder = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 1397var appDirectory = Path.Combine(workspace.Path, "myapp"); 1399var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1441var appDirectory = Path.Combine(workspace.Path, "myapp"); 1443var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1481var appDirectory = Path.Combine(workspace.Path, "myapp"); 1483var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1516var appDirectory = Path.Combine(workspace.Path, "myapp"); 1518var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1537var appDirectory = Path.Combine(workspace.Path, "myapp"); 1539var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1561var appDirectory = Path.Combine(workspace.Path, "myapp"); 1563var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1585var appDirectory = Path.Combine(workspace.Path, "myapp"); 1587var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1589var customWorkingDirectory = Path.Combine(workspace.Path, "custom"); 1612var appDirectory = Path.Combine(workspace.Path, "myapp"); 1614var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1616var customWorkingDirectory = Path.Combine(workspace.Path, "custom"); 1653var appDirectory = Path.Combine(workspace.Path, "myapp"); 1655var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1686var appDirectory = Path.Combine(workspace.Path, "myapp"); 1688var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1715var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 1737var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 1755var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py"); 2008var scriptPath = Path.Combine(workspace.Path, scriptName); 2012var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml"); 2015var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2042var scriptPath = Path.Combine(workspace.Path, scriptName); 2046var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2049var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2077var scriptPath = Path.Combine(workspace.Path, scriptName); 2081var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml"); 2083var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2086var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2107var scriptPath = Path.Combine(workspace.Path, scriptName); 2110var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, scriptName); 2131var scriptPath = Path.Combine(workspace.Path, scriptName); 2135builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2154var scriptPath = Path.Combine(workspace.Path, scriptName); 2158var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2162builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2182var scriptPath = Path.Combine(workspace.Path, scriptName); 2186var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2190builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2211var scriptPath = Path.Combine(workspace.Path, "main.py"); 2214var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2239var scriptPath = Path.Combine(workspace.Path, "main.py"); 2243var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2246var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2282var scriptPath = Path.Combine(workspace.Path, "main.py"); 2285var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2288var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2312var scriptPath = Path.Combine(workspace.Path, "main.py"); 2315var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2318var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2346var scriptPath = Path.Combine(workspace.Path, "main.py"); 2349var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2353var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2382var scriptPath = Path.Combine(workspace.Path, "main.py"); 2385var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2389var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2412var scriptPath = Path.Combine(workspace.Path, "main.py"); 2415var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2419var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2444var scriptPath = Path.Combine(workspace.Path, "main.py"); 2447var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2451var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2476var scriptPath = Path.Combine(workspace.Path, "main.py"); 2479var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2482var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2512var scriptPath = Path.Combine(workspace.Path, "main.py"); 2515var pythonApp = builder.AddPythonApp("pythonProject", workspace.Path, "main.py") 2547builder.AddPythonApp("pythonProject", workspace.Path, scriptName) 2566var scriptPath = Path.Combine(workspace.Path, scriptName); 2569var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2572builder.AddPythonApp("pythonProject", workspace.Path, scriptName)
Aspire.Hosting.Tests (3)
Dashboard\DashboardEventHandlersTests.cs (1)
332["Aspire:Store:Path"] = workspace.Path,
PublishAsDockerfileTests.cs (1)
515File.WriteAllText(Path.Join(workspace.Path, "Dockerfile"), "this does not matter");
WithVolumeTests.cs (1)
171builder.Configuration[AspireStore.AspireStorePathKeyName] = workspace.Path;
Aspire.Hosting.TestUtilities (1)
tests\Shared\TemporaryWorkspace.cs (1)
238var 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");