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