387 references to Path
Aspire.Hosting.Azure.Kusto.Tests (2)
KustoFunctionalTests.cs (2)
243container.WithBindMount(temp.Path, dbPath); 267return 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)
1621var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "publish-manifest"); 1637await VerifyFile(Path.Combine(tempDir.Path, "aspire-manifest.json")); 2011File.WriteAllText(Path.Combine(tempDirectory.Path, "Dockerfile"), "FROM alpine"); 2013builder.AddDockerfile("with-bind-mount", tempDirectory.Path) 2014.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 (74)
DockerComposePublisherTests.cs (58)
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); 134var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 135var envPath = Path.Combine(tempDir.Path, ".env"); 147using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path) 162var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 172using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "publish-docker-compose") 191var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 200var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 240var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 242var envPath = Path.Combine(tempDir.Path, ".env"); 253var envFilePath = Path.Combine(tempDir.Path, ".env"); 257var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 284var envFilePath = Path.Combine(tempDir.Path, ".env"); 288var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 325var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 339var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 352var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 365var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 378var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 391var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 404var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 419var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 432var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 451var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 463var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 476var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile"); 488var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, tempDir.Path); 500var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 509var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 527var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production")); 537var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 556var envFilePath = Path.Combine(tempDir.Path, ".env.Staging"); 569var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 590var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production")); 600var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 612var envFilePath = Path.Combine(tempDir.Path, ".env.Production"); 633var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: "prepare-docker-compose"); 646var envFilePath = Path.Combine(tempDir.Path, ".env.Staging"); 663var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 677var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 678var envPath = Path.Combine(tempDir.Path, ".env"); 691var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 704var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 720var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 735var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 736var envPath = Path.Combine(tempDir.Path, ".env"); 749var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 774var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 775var envPath = Path.Combine(tempDir.Path, ".env"); 788var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 822var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 823var envPath = Path.Combine(tempDir.Path, ".env"); 842var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 856var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 857var envPath = Path.Combine(tempDir.Path, ".env");
DockerComposeTests.cs (10)
130var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 147await VerifyDirectory(tempDir.Path); 155var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 167var composeFile = Path.Combine(tempDir.Path, "docker-compose.yaml"); 179var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 201var composeFile = Path.Combine(tempDir.Path, "docker-compose.yaml"); 263var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: step); 290var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 317var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: WellKnownPipelineSteps.Diagnostics); 364var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path, step: step);
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 (97)
AddJavaScriptAppTests.cs (12)
17using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 20var appDir = Path.Combine(tempDir.Path, "js"); 27await ManifestUtils.GetManifest(yarnApp.Resource, tempDir.Path); 29var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile"); 55using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 58var appDir = Path.Combine(tempDir.Path, "js"); 70await ManifestUtils.GetManifest(pnpmApp.Resource, tempDir.Path); 72var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile"); 84using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 87var appDir = Path.Combine(tempDir.Path, "pnpm-app"); 106await ManifestUtils.GetManifest(pnpmApp.Resource, tempDir.Path); 108var dockerfilePath = Path.Combine(tempDir.Path, "pnpm-app.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 (50)
19using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 22var viteDir = Path.Combine(tempDir.Path, "vite"); 31var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 57var dockerfilePath = Path.Combine(tempDir.Path, "vite.Dockerfile"); 91File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), packageJson); 93using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 94var nodeApp = builder.AddViteApp("vite", tempDir.Path) 97var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 99var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 111File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), "18.20.0"); 113using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 114var nodeApp = builder.AddViteApp("vite", tempDir.Path) 117var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 119var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 131File.WriteAllText(Path.Combine(tempDir.Path, ".node-version"), "v21.5.0"); 133using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 134var nodeApp = builder.AddViteApp("vite", tempDir.Path) 137var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 139var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 156File.WriteAllText(Path.Combine(tempDir.Path, ".tool-versions"), toolVersions); 158using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 159var nodeApp = builder.AddViteApp("vite", tempDir.Path) 162var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 164var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 176using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 177var nodeApp = builder.AddViteApp("vite", tempDir.Path) 180var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 182var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 198File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), versionString); 200using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 201var nodeApp = builder.AddViteApp("vite", tempDir.Path) 204var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 206var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 215using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 218var nodeApp = builder.AddViteApp("vite", tempDir.Path) 222var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 228var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 286var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin"); 290var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js"); 294var viteApp = builder.AddViteApp("test-app", tempDir.Path) 347var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin"); 351var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js"); 355var viteApp = builder.AddViteApp("test-app", tempDir.Path); 406var viteApp = builder.AddViteApp("test-app", tempDir.Path); 451var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin"); 455var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js"); 459var viteApp = builder.AddViteApp("test-app", tempDir.Path); 512var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin"); 516var viteConfigPath = Path.Combine(tempDir.Path, configFileName); 520var viteApp = builder.AddViteApp("test-app", tempDir.Path);
PackageInstallationTests.cs (13)
458File.WriteAllText(Path.Combine(tempDir.Path, "package-lock.json"), "empty"); 462var app = builder.AddViteApp("test-app", tempDir.Path) 485File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 489var app = builder.AddViteApp("test-app", tempDir.Path) 495var app2 = builder.AddViteApp("test-app2", tempDir.Path) 506File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 507File.WriteAllText(Path.Combine(tempDir.Path, ".yarnrc.yml"), "empty"); 511var app = builder.AddViteApp("test-app", tempDir.Path) 522File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 523Directory.CreateDirectory(Path.Combine(tempDir.Path, ".yarn", "releases")); 527var app = builder.AddViteApp("test-app", tempDir.Path) 538File.WriteAllText(Path.Combine(tempDir.Path, "pnpm-lock.yaml"), "empty"); 542var app = builder.AddViteApp("test-app", tempDir.Path)
Aspire.Hosting.Kubernetes.Tests (16)
KubernetesEnvironmentResourceTests.cs (2)
77var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 93await VerifyDirectory(tempDir.Path);
KubernetesPublisherTests.cs (14)
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"); 360var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 394var filePath = Path.Combine(tempDir.Path, expectedFile);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (1)
262builder.Configuration["Aspire:Store:Path"] = tempStore.Path;
MySqlFunctionalTests.cs (1)
564.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)
551.WithTempAspireStore(aspireStore.Path)
Aspire.Hosting.Python.Tests (135)
AddPythonAppTests.cs (132)
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) 828var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 852var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 883var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 910var pythonBuilder = builder.AddPythonApp("python-script", tempDir.Path, "main.py"); 929var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.Path, "flask"); 948var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.Path, "pytest"); 969builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 979var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 1005builder.AddPythonModule("pythonProject", tempDir.Path, moduleName); 1013var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 1039builder.AddPythonExecutable("pythonProject", tempDir.Path, executableName); 1047var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 1070var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.Path, "flask") 1094var pythonBuilder = builder.AddPythonApp("python-app", tempDir.Path, "main.py") 1116var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.Path, "pytest") 1138var pythonBuilder = builder.AddPythonApp("python-app", tempDir.Path, "main.py") 1172var pythonBuilder = builder.AddPythonApp("python-app", tempDir.Path, "main.py"); 1219var resourceBuilder = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1235var projectDirectory = sourceDir.Path; 1265using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1282var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1285var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1288var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1305var projectDirectory = sourceDir.Path; 1330using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1347var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1350var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1353var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1386var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1388var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1424var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1426var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1464var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1466var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1501var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1503var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1534var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1536var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1563var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1585var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1603var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py"); 1618var projectDirectory = sourceDir.Path; 1646using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1659var dockerfilePath = Path.Combine(outputDir.Path, "custom-images-app.Dockerfile"); 1676var projectDirectory = sourceDir.Path; 1691using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1700var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1723var projectDirectory = sourceDir.Path; 1740using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1749var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1762var projectDirectory = sourceDir.Path; 1771using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1780var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1793var projectDirectory = sourceDir.Path; 1805using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1816var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1819var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1822var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1851var scriptPath = Path.Combine(tempDir.Path, scriptName); 1855var pyprojectPath = Path.Combine(tempDir.Path, "pyproject.toml"); 1858var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1885var scriptPath = Path.Combine(tempDir.Path, scriptName); 1889var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 1892var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1920var scriptPath = Path.Combine(tempDir.Path, scriptName); 1924var pyprojectPath = Path.Combine(tempDir.Path, "pyproject.toml"); 1926var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 1929var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1950var scriptPath = Path.Combine(tempDir.Path, scriptName); 1953var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, scriptName); 1974var scriptPath = Path.Combine(tempDir.Path, scriptName); 1978builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 1979.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: false); 1997var scriptPath = Path.Combine(tempDir.Path, scriptName); 2001var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2005builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 2006.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: true); 2025var scriptPath = Path.Combine(tempDir.Path, scriptName); 2029var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2033builder.AddPythonApp("pythonProject", tempDir.Path, scriptName) 2034.WithVirtualEnvironment(tempVenvDir.Path); 2054var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2057var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2082var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2086var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2089var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2125var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2128var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2131var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2133.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: true); 2155var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2158var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2161var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2163.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: false); 2189var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2192var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2196var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2198.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: true) 2225var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2228var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2232var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2234.WithVirtualEnvironment(tempVenvDir.Path, createIfNotExists: false) 2255var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2258var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2262var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2287var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2290var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2294var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2319var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2322var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt"); 2325var pythonApp = builder.AddPythonApp("pythonProject", tempDir.Path, "main.py") 2355var scriptPath = Path.Combine(tempDir.Path, "main.py"); 2358var 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"); 77CreateAppProject(tempDirectory.Path, "App"); 79var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost"); 130var temp = tempDirectory?.Path; 266CreateLibraryProject(tempDirectory.Path, "Library"); 268var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost"); 325CreateLibraryProject(tempDirectory.Path, "Library"); 327var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
PublishAsDockerfileTests.cs (14)
20var path = tempDir.Path; 58var path = tempDir.Path; 111var path = tempDir.Path; 156var path = tempDir.Path; 218var path = tempDir.Path; 275var path = tempDir.Path; 292var path = tempDir.Path; 312var path = tempDir.Path; 335var path = tempDir.Path; 365var path = tempDir.Path; 382var path = tempDir.Path; 411var path = tempDir.Path; 428var path = tempDir.Path; 455File.WriteAllText(Path.Join(tempDir.Path, "Dockerfile"), "this does not matter");
Publishing\ResourceContainerImageManagerTests.cs (1)
273ctx.OutputPath = 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");