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