343 references to Path
Aspire.Hosting.Azure.Kusto.Tests (2)
KustoFunctionalTests.cs (2)
241container.WithBindMount(temp.Path, dbPath); 265return Directory.GetFileSystemEntries(temp.Path, searchPattern, enumerationOptions);
Aspire.Hosting.Azure.Tests (21)
AzureAppServiceTests.cs (3)
343var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "publish-manifest"); 364Path.Combine(tempDir.Path, "aspire-manifest.json"), 373var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path);
AzureContainerAppsTests.cs (5)
1619var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "publish-manifest"); 1635await VerifyFile(Path.Combine(tempDir.Path, "aspire-manifest.json")); 2009File.WriteAllText(Path.Combine(tempDirectory.Path, "Dockerfile"), "FROM alpine"); 2011builder.AddDockerfile("with-bind-mount", tempDirectory.Path) 2012.WithBindMount(tempDirectory.Path, "/app/data");
AzureEnvironmentResourceTests.cs (6)
189tempDir.Path); 203var mainBicepPath = Path.Combine(tempDir.Path, "main.bicep"); 208var includedStorageBicepPath = Path.Combine(tempDir.Path, "included-storage", "included-storage.bicep"); 212var excludedStorageBicepPath = Path.Combine(tempDir.Path, "excluded-storage", "excluded-storage.bicep"); 222var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 234var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
AzureFunctionsTests.cs (7)
616var projectPath = Path.Combine(tempDir.Path, "TestFunctions.csproj"); 641var projectPath = Path.Combine(tempDir.Path, "MyFunctions.csproj"); 663var projectPath = Path.Combine(tempDir.Path, "TestFunctions.csproj"); 694var projectPath1 = Path.Combine(tempDir.Path, "Functions1.csproj"); 695var projectPath2 = Path.Combine(tempDir.Path, "Functions2.csproj"); 717var projectPath = Path.Combine(tempDir.Path, "Functions.csproj"); 749var projectPath = Path.Combine(tempDir.Path, "Functions.csproj");
Aspire.Hosting.Containers.Tests (4)
DockerSocketBindMountTests.cs (4)
24var dockerFilePath = Path.Combine(dir.Path, "Dockerfile"); 29appBuilder.AddDockerfile("docker-client", contextPath: dir.Path) 31.WithBindMount(outDir.Path, "/out"); 48var infoFile = Path.Combine(outDir.Path, "docker-info.txt");
Aspire.Hosting.Docker.Tests (55)
DockerComposePublisherTests.cs (41)
22var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 97var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 98var envPath = Path.Combine(tempDir.Path, ".env"); 112var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 130var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 131var envPath = Path.Combine(tempDir.Path, ".env"); 143using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path) 158var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 168using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "publish-docker-compose") 187var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 196var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 236var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 238var envPath = Path.Combine(tempDir.Path, ".env"); 249var envFilePath = Path.Combine(tempDir.Path, ".env"); 253var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 280var envFilePath = Path.Combine(tempDir.Path, ".env"); 284var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 321var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 335var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 348var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 361var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 374var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 387var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 400var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 415var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 428var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 447var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 459var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 472var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile"); 484var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, tempDir.Path); 496var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 505var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 523var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production")); 533var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 552var envFilePath = Path.Combine(tempDir.Path, ".env.Staging"); 565var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 586var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production")); 596var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 608var envFilePath = Path.Combine(tempDir.Path, ".env.Production"); 629var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 642var envFilePath = Path.Combine(tempDir.Path, ".env.Staging");
DockerComposeTests.cs (8)
128var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 145await VerifyDirectory(tempDir.Path); 153var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 165var composeFile = Path.Combine(tempDir.Path, "docker-compose.yaml"); 177var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 199var composeFile = Path.Combine(tempDir.Path, "docker-compose.yaml"); 259var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: WellKnownPipelineSteps.Deploy); 282var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
EnvFileTests.cs (6)
12var envFilePath = Path.Combine(tempDir.Path, ".env"); 38var envFilePath = Path.Combine(tempDir.Path, ".env"); 64var envFilePath = Path.Combine(tempDir.Path, ".env"); 104var envFilePath = Path.Combine(tempDir.Path, ".env"); 129var envFilePath = Path.Combine(tempDir.Path, ".env"); 146var envFilePath = Path.Combine(tempDir.Path, ".env");
Aspire.Hosting.JavaScript.Tests (80)
AddJavaScriptAppTests.cs (8)
15using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 18var appDir = Path.Combine(tempDir.Path, "js"); 25await ManifestUtils.GetManifest(yarnApp.Resource, tempDir.Path); 27var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile"); 53using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 56var appDir = Path.Combine(tempDir.Path, "js"); 68await ManifestUtils.GetManifest(pnpmApp.Resource, tempDir.Path); 70var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile");
AddNodeAppTests.cs (22)
90using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 92var appDir = Path.Combine(tempDir.Path, "js"); 103await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 105var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile"); 158using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 160var appDir = Path.Combine(tempDir.Path, "js"); 172await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 174var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile"); 205using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 207var appDir = Path.Combine(tempDir.Path, "js"); 217await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 220var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "js.Dockerfile")); 229File.WriteAllText(Path.Combine(tempDir.Path, "app.js"), "{}"); 233builder.AddNodeApp("nodeapp", tempDir.Path, "app.js"); 256File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), "{}"); 260builder.AddNodeApp("nodeapp", tempDir.Path, "app.js"); 312var appDirectory = sourceDir.Path; 332using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 355var nodeDockerfilePath = Path.Combine(outputDir.Path, "nodeapp.Dockerfile"); 368var appDirectory = sourceDir.Path; 388using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 411var nodeDockerfilePath = Path.Combine(outputDir.Path, "nodeapp.Dockerfile");
AddViteAppTests.cs (37)
17using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 20var viteDir = Path.Combine(tempDir.Path, "vite"); 29var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 55var dockerfilePath = Path.Combine(tempDir.Path, "vite.Dockerfile"); 89File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), packageJson); 91using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 92var nodeApp = builder.AddViteApp("vite", tempDir.Path) 95var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 97var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 109File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), "18.20.0"); 111using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 112var nodeApp = builder.AddViteApp("vite", tempDir.Path) 115var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 117var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 129File.WriteAllText(Path.Combine(tempDir.Path, ".node-version"), "v21.5.0"); 131using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 132var nodeApp = builder.AddViteApp("vite", tempDir.Path) 135var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 137var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 154File.WriteAllText(Path.Combine(tempDir.Path, ".tool-versions"), toolVersions); 156using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 157var nodeApp = builder.AddViteApp("vite", tempDir.Path) 160var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 162var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 174using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 175var nodeApp = builder.AddViteApp("vite", tempDir.Path) 178var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 180var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 196File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), versionString); 198using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 199var nodeApp = builder.AddViteApp("vite", tempDir.Path) 202var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 204var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 213using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 216var nodeApp = builder.AddViteApp("vite", tempDir.Path) 220var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 226var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
PackageInstallationTests.cs (13)
444File.WriteAllText(Path.Combine(tempDir.Path, "package-lock.json"), "empty"); 448var app = builder.AddViteApp("test-app", tempDir.Path) 471File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 475var app = builder.AddViteApp("test-app", tempDir.Path) 481var app2 = builder.AddViteApp("test-app2", tempDir.Path) 492File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 493File.WriteAllText(Path.Combine(tempDir.Path, ".yarnrc.yml"), "empty"); 497var app = builder.AddViteApp("test-app", tempDir.Path) 508File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 509Directory.CreateDirectory(Path.Combine(tempDir.Path, ".yarn", "releases")); 513var app = builder.AddViteApp("test-app", tempDir.Path) 524File.WriteAllText(Path.Combine(tempDir.Path, "pnpm-lock.yaml"), "empty"); 528var app = builder.AddViteApp("test-app", tempDir.Path)
Aspire.Hosting.Kubernetes.Tests (14)
KubernetesEnvironmentResourceTests.cs (2)
77var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 93await VerifyDirectory(tempDir.Path);
KubernetesPublisherTests.cs (12)
17var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 63var filePath = Path.Combine(tempDir.Path, expectedFile); 83var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 102var deploymentPath = Path.Combine(tempDir.Path, "templates/service/deployment.yaml"); 114var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 158var filePath = Path.Combine(tempDir.Path, expectedFile); 178var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 212var filePath = Path.Combine(tempDir.Path, expectedFile); 232var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 267var filePath = Path.Combine(tempDir.Path, expectedFile); 287var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 299var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (1)
262builder.Configuration["Aspire:Store:Path"] = tempStore.Path;
MySqlFunctionalTests.cs (1)
560.WithTempAspireStore(aspireStore.Path)
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (2)
457builder.Configuration["Aspire:Store:Path"] = tempStore.Path; 519builder.Configuration["Aspire:Store:Path"] = tempStore.Path;
PostgresFunctionalTests.cs (1)
549.WithTempAspireStore(aspireStore.Path)
Aspire.Hosting.Python.Tests (129)
AddPythonAppTests.cs (126)
397builder.AddPythonApp("pythonProject", tempDir.Path, "main.py")); 410builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 419var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 443builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 444.WithVirtualEnvironment(tempVenvDir.Path); 454Assert.Equal(Path.Join(tempVenvDir.Path, "Scripts", "python.exe"), pythonProjectResource.Command); 458Assert.Equal(Path.Join(tempVenvDir.Path, "bin", "python"), pythonProjectResource.Command); 483var resourceBuilder = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 502var resourceBuilder = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 531var appVenvPath = Path.Combine(tempAppDir.Path, ".venv"); 535var resourceBuilder = builder.AddPythonApp("pythonProject", tempAppDir.Path, scriptName); 544var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempAppDir.Path)); 647var resourceBuilder = builder.AddPythonApp("pythonProject", tempAppDir.Path, scriptName); 656var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempAppDir.Path)); 719var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 729var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 750var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 770builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 808var pythonBuilder = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 829var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 860var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 887var pythonBuilder = builder.AddPythonApp("python-script", tempDir.Path, "main.py"); 906var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.Path, "flask"); 925var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.Path, "pytest"); 946builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 956var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 982builder.AddPythonModule("pythonProject", tempDir.Path, moduleName); 990var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 1016builder.AddPythonExecutable("pythonProject", tempDir.Path, executableName); 1024var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 1047var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.Path, "flask") 1071var pythonBuilder = builder.AddPythonApp("python-app", tempDir.Path, "main.py") 1093var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.Path, "pytest") 1115var pythonBuilder = builder.AddPythonApp("python-app", tempDir.Path, "main.py") 1149var pythonBuilder = builder.AddPythonApp("python-app", tempDir.Path, "main.py"); 1196var resourceBuilder = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1212var projectDirectory = sourceDir.Path; 1242using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1259var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1262var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1265var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1282var projectDirectory = sourceDir.Path; 1307using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1324var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1327var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1330var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1363var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1365var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1401var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1403var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1441var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1443var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1478var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1480var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1511var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1513var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1540var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1562var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1580var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1595var projectDirectory = sourceDir.Path; 1623using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1636var dockerfilePath = Path.Combine(outputDir.Path, "custom-images-app.Dockerfile"); 1653var projectDirectory = sourceDir.Path; 1668using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1677var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1700var projectDirectory = sourceDir.Path; 1717using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1726var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1739var projectDirectory = sourceDir.Path; 1748using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1757var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1770var projectDirectory = sourceDir.Path; 1782using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1793var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1796var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1799var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1828var scriptPath = Path.Combine(tempDir.Path, scriptName); 1832var pyprojectPath = Path.Combine(tempDir.Path, "pyproject.toml"); 1835var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1862var scriptPath = Path.Combine(tempDir.Path, scriptName); 1866var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 1869var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1897var scriptPath = Path.Combine(tempDir.Path, scriptName); 1901var pyprojectPath = Path.Combine(tempDir.Path, "pyproject.toml"); 1903var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 1906var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1927var scriptPath = Path.Combine(tempDir.Path, scriptName); 1930var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1951var scriptPath = Path.Combine(tempDir.Path, scriptName); 1955builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 1956.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: false); 1974var scriptPath = Path.Combine(tempDir.Path, scriptName); 1978var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 1982builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 1983.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: true); 2002var scriptPath = Path.Combine(tempDir.Path, scriptName); 2006var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2010builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 2011.WithVirtualEnvironment(tempVenvDir.Path); 2031var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2034var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2059var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2063var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2066var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2102var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2105var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2108var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2110.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: true); 2132var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2135var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2138var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2140.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: false); 2166var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2169var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2173var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2175.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: true) 2202var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2205var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2209var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2211.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: false) 2232var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2235var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2239var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2264var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2267var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2271var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py")
AddUvicornAppTests.cs (3)
33var projectDirectory = sourceDir.Path; 63using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 87var appDockerfilePath = Path.Combine(outputDir.Path, "main.Dockerfile");
Aspire.Hosting.Tests (25)
MSBuildTests.cs (9)
20CreateLibraryProject(tempDirectory.Path, "Library"); 22var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost"); 76CreateAppProject(tempDirectory.Path, "App"); 78var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost"); 128var temp = tempDirectory?.Path; 254CreateLibraryProject(tempDirectory.Path, "Library"); 256var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost"); 312CreateLibraryProject(tempDirectory.Path, "Library"); 314var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
PublishAsDockerfileTests.cs (14)
18var path = tempDir.Path; 56var path = tempDir.Path; 109var path = tempDir.Path; 154var path = tempDir.Path; 216var path = tempDir.Path; 273var path = tempDir.Path; 290var path = tempDir.Path; 310var path = tempDir.Path; 333var path = tempDir.Path; 363var path = tempDir.Path; 380var path = tempDir.Path; 409var path = tempDir.Path; 426var path = tempDir.Path; 453File.WriteAllText(Path.Join(tempDir.Path, "Dockerfile"), "this does not matter");
Publishing\ResourceContainerImageBuilderTests.cs (1)
284OutputPath = Path.Combine(tempDir.Path, "NewFolder"), // tests that the folder is created if it doesn't exist
tests\Shared\TempDirectory.cs (1)
12Directory.Delete(Path, recursive: true);
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (6)
147var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 162var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 176var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 188var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 192Assert.Contains(tempDir.Path, annotation.ContextPath); 201var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path);
YarpConfigGeneratorTests.cs (2)
268using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 293var composeFile = Path.Combine(tempDir.Path, "docker-compose.yaml");