214 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 (14)
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");
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 (43)
DockerComposePublisherTests.cs (31)
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"); 170using var builder = TestDistributedApplicationBuilder.Create(["--operation", "publish", "--publisher", "default", "--output-path", tempDir.Path]) 193var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 202var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 242var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 244var envPath = Path.Combine(tempDir.Path, ".env"); 255var envFilePath = Path.Combine(tempDir.Path, ".env"); 259var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 286var envFilePath = Path.Combine(tempDir.Path, ".env"); 290var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 327var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 341var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 354var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 367var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 380var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 393var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 406var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 421var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 434var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 453var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml"); 465var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 478var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile"); 490var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, tempDir.Path); 502var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
DockerComposeTests.cs (6)
125var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 142await VerifyDirectory(tempDir.Path); 150var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 162var composeFile = Path.Combine(tempDir.Path, "docker-compose.yaml"); 174var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.Path); 196var composeFile = 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.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)
261builder.Configuration["Aspire:Store:Path"] = tempStore.Path;
MySqlFunctionalTests.cs (1)
560.WithTempAspireStore(aspireStore.Path)
Aspire.Hosting.NodeJs.Tests (48)
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"); 50using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 53var appDir = Path.Combine(tempDir.Path, "js"); 60await ManifestUtils.GetManifest(pnpmApp.Resource, tempDir.Path); 62var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile");
AddViteAppTests.cs (33)
15using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 18var viteDir = Path.Combine(tempDir.Path, "vite"); 27var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 52var dockerfilePath = Path.Combine(tempDir.Path, "vite.Dockerfile"); 85File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), packageJson); 87using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 88var nodeApp = builder.AddViteApp("vite", tempDir.Path) 91var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 93var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 105File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), "18.20.0"); 107using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 108var nodeApp = builder.AddViteApp("vite", tempDir.Path) 111var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 113var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 125File.WriteAllText(Path.Combine(tempDir.Path, ".node-version"), "v21.5.0"); 127using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 128var nodeApp = builder.AddViteApp("vite", tempDir.Path) 131var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 133var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 150File.WriteAllText(Path.Combine(tempDir.Path, ".tool-versions"), toolVersions); 152using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 153var nodeApp = builder.AddViteApp("vite", tempDir.Path) 156var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 158var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 170using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 171var nodeApp = builder.AddViteApp("vite", tempDir.Path) 174var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 176var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile")); 192File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), versionString); 194using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.Path).WithResourceCleanUp(true); 195var nodeApp = builder.AddViteApp("vite", tempDir.Path) 198var manifest = await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.Path); 200var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
PackageInstallationTests.cs (7)
420File.WriteAllText(Path.Combine(tempDir.Path, "package-lock.json"), "empty"); 424var app = builder.AddViteApp("test-app", tempDir.Path) 447File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty"); 451var app = builder.AddViteApp("test-app", tempDir.Path) 457var app2 = builder.AddViteApp("test-app2", tempDir.Path) 468File.WriteAllText(Path.Combine(tempDir.Path, "pnpm-lock.yaml"), "empty"); 472var app = builder.AddViteApp("test-app", tempDir.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 (55)
AddPythonAppTests.cs (52)
383builder.AddPythonScript("pythonProject", tempDir.Path, "main.py")); 396builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 405var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 429builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 430.WithVirtualEnvironment(tempVenvDir.Path); 440Assert.Equal(Path.Join(tempVenvDir.Path, "Scripts", "python.exe"), pythonProjectResource.Command); 444Assert.Equal(Path.Join(tempVenvDir.Path, "bin", "python"), pythonProjectResource.Command); 469var resourceBuilder = builder.AddPythonScript("pythonProject", tempDir.Path, scriptName); 488var resourceBuilder = builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 518builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 528var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 540builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 561builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 596var pythonBuilder = builder.AddPythonScript("pythonProject", tempDir.Path, scriptName) 614var pythonBuilder = builder.AddPythonScript("python-script", tempDir.Path, "main.py"); 633var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.Path, "flask"); 652var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.Path, "pytest"); 673builder.AddPythonScript("pythonProject", tempDir.Path, scriptName); 683var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 709builder.AddPythonModule("pythonProject", tempDir.Path, moduleName); 717var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 743builder.AddPythonExecutable("pythonProject", tempDir.Path, executableName); 751var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path)); 774var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.Path, "flask") 798var pythonBuilder = builder.AddPythonScript("python-app", tempDir.Path, "main.py") 820var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.Path, "pytest") 842var pythonBuilder = builder.AddPythonScript("python-app", tempDir.Path, "main.py") 876var pythonBuilder = builder.AddPythonScript("python-app", tempDir.Path, "main.py"); 923var resourceBuilder = builder.AddPythonScript("pythonProject", tempDir.Path, "main.py"); 939var projectDirectory = sourceDir.Path; 969using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 986var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 989var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 992var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1009var projectDirectory = sourceDir.Path; 1034using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.Path, step: "publish-manifest"); 1051var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile"); 1054var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile"); 1057var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile"); 1090var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1092var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1128var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1130var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1168var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1170var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1205var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1207var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1238var appDirectory = Path.Combine(tempDir.Path, "myapp"); 1240var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv"); 1267var pythonApp = builder.AddPythonScript("pythonProject", tempDir.Path, "main.py"); 1289var pythonApp = builder.AddPythonScript("pythonProject", tempDir.Path, "main.py"); 1307var pythonApp = builder.AddPythonScript("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 (21)
MSBuildTests.cs (5)
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;
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)
250OutputPath = 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)
134var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 149var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 163var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 175var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.Path); 179Assert.Contains(tempDir.Path, annotation.ContextPath); 188var 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");