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