436 references to Path
Aspire.Hosting.Azure.Kusto.Tests (2)
KustoFunctionalTests.cs (2)
247
container.WithBindMount(temp.
Path
, dbPath);
271
return Directory.GetFileSystemEntries(temp.
Path
, searchPattern, enumerationOptions);
Aspire.Hosting.Azure.Tests (29)
AzureAppServiceTests.cs (5)
83
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "validate-appservice-config-env");
124
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "validate-appservice-config-env");
419
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "publish-manifest");
440
Path.Combine(tempDir.
Path
, "aspire-manifest.json"),
449
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
AzureBicepResourceTests.cs (4)
261
var bicepFilePath = Path.Combine(tempDir.
Path
, bicepFileName);
268
var outputDir = Path.Combine(tempDir.
Path
, "output");
286
var bicepFilePath = Path.Combine(tempDir.
Path
, bicepFileName);
310
var outputDir = Path.Combine(tempDir.
Path
, "output");
AzureContainerAppsTests.cs (5)
1749
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "publish-manifest");
1765
await VerifyFile(Path.Combine(tempDir.
Path
, "aspire-manifest.json"));
2139
File.WriteAllText(Path.Combine(tempDirectory.
Path
, "Dockerfile"), "FROM alpine");
2141
builder.AddDockerfile("with-bind-mount", tempDirectory.
Path
)
2142
.WithBindMount(tempDirectory.
Path
, "/app/data");
AzureEnvironmentResourceTests.cs (8)
190
tempDir.
Path
);
204
var mainBicepPath = Path.Combine(tempDir.
Path
, "main.bicep");
209
var includedStorageBicepPath = Path.Combine(tempDir.
Path
, "included-storage", "included-storage.bicep");
213
var excludedStorageBicepPath = Path.Combine(tempDir.
Path
, "excluded-storage", "excluded-storage.bicep");
223
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
235
var dockerfilePath = Path.Combine(tempDir.
Path
, "testcontainer.Dockerfile");
248
remoteInvokeOptions.StartInfo.WorkingDirectory = testTempDir.
Path
;
249
RemoteExecutor.Invoke(RunTest, testTempDir.
Path
, remoteInvokeOptions).Dispose();
AzureFunctionsTests.cs (7)
650
var projectPath = Path.Combine(tempDir.
Path
, "TestFunctions.csproj");
675
var projectPath = Path.Combine(tempDir.
Path
, "MyFunctions.csproj");
697
var projectPath = Path.Combine(tempDir.
Path
, "TestFunctions.csproj");
727
var projectPath1 = Path.Combine(tempDir.
Path
, "Functions1.csproj");
728
var projectPath2 = Path.Combine(tempDir.
Path
, "Functions2.csproj");
750
var projectPath = Path.Combine(tempDir.
Path
, "Functions.csproj");
782
var projectPath = Path.Combine(tempDir.
Path
, "Functions.csproj");
Aspire.Hosting.Containers.Tests (4)
DockerSocketBindMountTests.cs (4)
23
var dockerFilePath = Path.Combine(dir.
Path
, "Dockerfile");
28
appBuilder.AddDockerfile("docker-client", contextPath: dir.
Path
)
30
.WithBindMount(outDir.
Path
, "/out");
47
var infoFile = Path.Combine(outDir.
Path
, "docker-info.txt");
Aspire.Hosting.Docker.Tests (86)
DockerComposePublisherTests.cs (66)
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");
351
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
365
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
380
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
397
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
413
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
426
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
439
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
452
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
465
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
480
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
493
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
512
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
524
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
537
var dockerfilePath = Path.Combine(tempDir.
Path
, "testcontainer.Dockerfile");
549
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Run, tempDir.
Path
);
561
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
570
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "prepare-docker-compose");
588
var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.
Path
, ".env.Production"));
598
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "prepare-docker-compose");
617
var envFilePath = Path.Combine(tempDir.
Path
, ".env.Staging");
630
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "prepare-docker-compose");
651
var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.
Path
, ".env.Production"));
661
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "prepare-docker-compose");
673
var envFilePath = Path.Combine(tempDir.
Path
, ".env.Production");
694
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "prepare-docker-compose");
707
var envFilePath = Path.Combine(tempDir.
Path
, ".env.Staging");
724
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
738
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
739
var envPath = Path.Combine(tempDir.
Path
, ".env");
752
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
765
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
781
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
796
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
797
var envPath = Path.Combine(tempDir.
Path
, ".env");
810
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
835
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
836
var envPath = Path.Combine(tempDir.
Path
, ".env");
849
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
883
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
884
var envPath = Path.Combine(tempDir.
Path
, ".env");
903
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
917
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
918
var envPath = Path.Combine(tempDir.
Path
, ".env");
930
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
961
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
971
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
995
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
DockerComposeTests.cs (14)
133
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
150
await VerifyDirectory(tempDir.
Path
);
158
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
170
var composeFile = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
182
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
204
var composeFile = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
266
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: step);
293
var composePath = Path.Combine(tempDir.
Path
, "docker-compose.yaml");
320
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: WellKnownPipelineSteps.Diagnostics);
368
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: step);
631
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "push-servicea");
661
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: "push-servicea");
697
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: WellKnownPipelineSteps.Diagnostics);
745
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
, step: WellKnownPipelineSteps.Diagnostics);
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 (109)
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 (31)
99
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
101
var appDir = Path.Combine(tempDir.
Path
, "js");
112
await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.
Path
);
114
var dockerfilePath = Path.Combine(tempDir.
Path
, "js.Dockerfile");
167
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
169
var appDir = Path.Combine(tempDir.
Path
, "js");
181
await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.
Path
);
183
var dockerfilePath = Path.Combine(tempDir.
Path
, "js.Dockerfile");
214
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: tempDir.
Path
).WithResourceCleanUp(true);
216
var appDir = Path.Combine(tempDir.
Path
, "js");
226
await ManifestUtils.GetManifest(nodeApp.Resource, tempDir.
Path
);
229
var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.
Path
, "js.Dockerfile"));
238
File.WriteAllText(Path.Combine(tempDir.
Path
, "app.js"), "{}");
242
builder.AddNodeApp("nodeapp", tempDir.
Path
, "app.js");
265
File.WriteAllText(Path.Combine(tempDir.
Path
, "package.json"), "{}");
269
builder.AddNodeApp("nodeapp", tempDir.
Path
, "app.js");
321
var appDirectory = sourceDir.
Path
;
341
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
364
var nodeDockerfilePath = Path.Combine(outputDir.
Path
, "nodeapp.Dockerfile");
377
var appDirectory = sourceDir.
Path
;
397
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
420
var nodeDockerfilePath = Path.Combine(outputDir.
Path
, "nodeapp.Dockerfile");
439
var nodeApp = builder.AddNodeApp("nodeapp", tempDir.
Path
, "app.js");
452
var nodeApp = builder.AddNodeApp("nodeapp", tempDir.
Path
, "app.js");
464
var viteApp = builder.AddViteApp("viteapp", tempDir.
Path
);
477
var viteApp = builder.AddViteApp("viteapp", tempDir.
Path
)
504
var viteApp = builder.AddViteApp("viteapp", tempDir.
Path
)
521
var viteApp = builder.AddViteApp("viteapp", tempDir.
Path
)
538
var resource = new JavaScriptAppResource("jsapp", "npm", tempDir.
Path
);
559
File.WriteAllText(Path.Combine(tempDir.
Path
, "app.js"), "console.log('hello');");
561
var nodeApp = builder.AddNodeApp("nodeapp", tempDir.
Path
, "app.js")
AddViteAppTests.cs (51)
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
);
506
var subDir = Path.Combine(tempDir.
Path
, "my-app", "frontend");
585
var nodeModulesBinDir = Path.Combine(tempDir.
Path
, "node_modules", ".bin");
589
var viteConfigPath = Path.Combine(tempDir.
Path
, configFileName);
593
var viteApp = builder.AddViteApp("test-app", tempDir.
Path
);
PackageInstallationTests.cs (15)
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
)
553
File.WriteAllText(Path.Combine(tempDir.
Path
, "bun.lock"), "empty");
557
var app = builder.AddViteApp("test-app", tempDir.
Path
)
Aspire.Hosting.Kubernetes.Tests (24)
KubernetesEnvironmentResourceTests.cs (2)
78
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
94
await VerifyDirectory(tempDir.
Path
);
KubernetesPublisherTests.cs (22)
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);
414
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
438
var filePath = Path.Combine(tempDir.
Path
, expectedFile);
456
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
495
var filePath = Path.Combine(tempDir.
Path
, expectedFile);
515
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
549
var filePath = Path.Combine(tempDir.
Path
, expectedFile);
569
var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
606
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)
481
builder.Configuration["Aspire:Store:Path"] = tempStore.
Path
;
543
builder.Configuration["Aspire:Store:Path"] = tempStore.
Path
;
PostgresFunctionalTests.cs (1)
551
.WithTempAspireStore(aspireStore.
Path
)
Aspire.Hosting.Python.Tests (138)
AddPythonAppTests.cs (135)
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
));
556
options.ProjectDirectory = tempProjectDir.
Path
;
602
options.ProjectDirectory = tempProjectDir.
Path
;
654
var resourceBuilder = builder.AddPythonApp("pythonProject", tempAppDir.
Path
, scriptName);
663
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempAppDir.
Path
));
675
options.ProjectDirectory = tempProjectDir.
Path
;
730
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
740
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.
Path
));
761
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
781
builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
819
var pythonBuilder = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
839
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
863
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
894
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
921
var pythonBuilder = builder.AddPythonApp("python-script", tempDir.
Path
, "main.py");
940
var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.
Path
, "flask");
959
var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.
Path
, "pytest");
980
builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName);
990
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.
Path
));
1016
builder.AddPythonModule("pythonProject", tempDir.
Path
, moduleName);
1024
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.
Path
));
1050
builder.AddPythonExecutable("pythonProject", tempDir.
Path
, executableName);
1058
var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.
Path
));
1081
var pythonBuilder = builder.AddPythonModule("flask-app", tempDir.
Path
, "flask")
1105
var pythonBuilder = builder.AddPythonApp("python-app", tempDir.
Path
, "main.py")
1127
var pythonBuilder = builder.AddPythonExecutable("pytest", tempDir.
Path
, "pytest")
1149
var pythonBuilder = builder.AddPythonApp("python-app", tempDir.
Path
, "main.py")
1183
var pythonBuilder = builder.AddPythonApp("python-app", tempDir.
Path
, "main.py");
1230
var resourceBuilder = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py");
1246
var projectDirectory = sourceDir.
Path
;
1276
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1293
var scriptDockerfilePath = Path.Combine(outputDir.
Path
, "script-app.Dockerfile");
1296
var moduleDockerfilePath = Path.Combine(outputDir.
Path
, "module-app.Dockerfile");
1299
var executableDockerfilePath = Path.Combine(outputDir.
Path
, "executable-app.Dockerfile");
1316
var projectDirectory = sourceDir.
Path
;
1341
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1358
var scriptDockerfilePath = Path.Combine(outputDir.
Path
, "script-app.Dockerfile");
1361
var moduleDockerfilePath = Path.Combine(outputDir.
Path
, "module-app.Dockerfile");
1364
var executableDockerfilePath = Path.Combine(outputDir.
Path
, "executable-app.Dockerfile");
1397
var appDirectory = Path.Combine(tempDir.
Path
, "myapp");
1399
var virtualEnvironmentPath = Path.Combine(tempDir.
Path
, ".venv");
1435
var appDirectory = Path.Combine(tempDir.
Path
, "myapp");
1437
var virtualEnvironmentPath = Path.Combine(tempDir.
Path
, ".venv");
1475
var appDirectory = Path.Combine(tempDir.
Path
, "myapp");
1477
var virtualEnvironmentPath = Path.Combine(tempDir.
Path
, ".venv");
1512
var appDirectory = Path.Combine(tempDir.
Path
, "myapp");
1514
var virtualEnvironmentPath = Path.Combine(tempDir.
Path
, ".venv");
1545
var appDirectory = Path.Combine(tempDir.
Path
, "myapp");
1547
var virtualEnvironmentPath = Path.Combine(tempDir.
Path
, ".venv");
1574
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py");
1596
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py");
1614
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py");
1629
var projectDirectory = sourceDir.
Path
;
1657
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1670
var dockerfilePath = Path.Combine(outputDir.
Path
, "custom-images-app.Dockerfile");
1687
var projectDirectory = sourceDir.
Path
;
1702
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1711
var dockerfilePath = Path.Combine(outputDir.
Path
, "script-app.Dockerfile");
1734
var projectDirectory = sourceDir.
Path
;
1751
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1760
var dockerfilePath = Path.Combine(outputDir.
Path
, "script-app.Dockerfile");
1773
var projectDirectory = sourceDir.
Path
;
1782
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1791
var dockerfilePath = Path.Combine(outputDir.
Path
, "script-app.Dockerfile");
1804
var projectDirectory = sourceDir.
Path
;
1816
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputDir.
Path
, step: "publish-manifest");
1827
var scriptDockerfilePath = Path.Combine(outputDir.
Path
, "script-app.Dockerfile");
1830
var moduleDockerfilePath = Path.Combine(outputDir.
Path
, "module-app.Dockerfile");
1833
var executableDockerfilePath = Path.Combine(outputDir.
Path
, "executable-app.Dockerfile");
1862
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
1866
var pyprojectPath = Path.Combine(tempDir.
Path
, "pyproject.toml");
1869
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName);
1896
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
1900
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
1903
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName);
1931
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
1935
var pyprojectPath = Path.Combine(tempDir.
Path
, "pyproject.toml");
1937
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
1940
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName);
1961
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
1964
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName);
1985
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
1989
builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
1990
.WithVirtualEnvironment(tempVenvDir.
Path
, createIfNotExists: false);
2008
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
2012
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2016
builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
2017
.WithVirtualEnvironment(tempVenvDir.
Path
, createIfNotExists: true);
2036
var scriptPath = Path.Combine(tempDir.
Path
, scriptName);
2040
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2044
builder.AddPythonApp("pythonProject", tempDir.
Path
, scriptName)
2045
.WithVirtualEnvironment(tempVenvDir.
Path
);
2065
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2068
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2093
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2097
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2100
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2136
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2139
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2142
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2144
.WithVirtualEnvironment(tempVenvDir.
Path
, createIfNotExists: true);
2166
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2169
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2172
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2174
.WithVirtualEnvironment(tempVenvDir.
Path
, createIfNotExists: false);
2200
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2203
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2207
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2209
.WithVirtualEnvironment(tempVenvDir.
Path
, createIfNotExists: true)
2236
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2239
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2243
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2245
.WithVirtualEnvironment(tempVenvDir.
Path
, createIfNotExists: false)
2266
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2269
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2273
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2298
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2301
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2305
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2330
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2333
var requirementsPath = Path.Combine(tempDir.
Path
, "requirements.txt");
2336
var pythonApp = builder.AddPythonApp("pythonProject", tempDir.
Path
, "main.py")
2366
var scriptPath = Path.Combine(tempDir.
Path
, "main.py");
2369
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 (31)
MSBuildTests.cs (12)
21
CreateLibraryProject(tempDirectory.
Path
, "Library");
23
var appHostDirectory = Path.Combine(tempDirectory.
Path
, "AppHost");
78
CreateAppProject(tempDirectory.
Path
, "App");
80
var appHostDirectory = Path.Combine(tempDirectory.
Path
, "AppHost");
131
var temp = tempDirectory?.
Path
;
267
CreateLibraryProject(tempDirectory.
Path
, "Library");
269
var appHostDirectory = Path.Combine(tempDirectory.
Path
, "AppHost");
326
CreateLibraryProject(tempDirectory.
Path
, "Library");
328
var appHostDirectory = Path.Combine(tempDirectory.
Path
, "AppHost");
381
var projectDirectory = Path.Combine(tempDirectory.
Path
, "MyHostingExtension");
430
var projectDirectory = Path.Combine(tempDirectory.
Path
, "MyHostingExtension");
511
var appHostDirectory = Path.Combine(tempDirectory.
Path
, "AppHost");
PublishAsDockerfileTests.cs (14)
21
var path = tempDir.
Path
;
59
var path = tempDir.
Path
;
112
var path = tempDir.
Path
;
157
var path = tempDir.
Path
;
219
var path = tempDir.
Path
;
274
var path = tempDir.
Path
;
291
var path = tempDir.
Path
;
311
var path = tempDir.
Path
;
334
var path = tempDir.
Path
;
364
var path = tempDir.
Path
;
381
var path = tempDir.
Path
;
410
var path = tempDir.
Path
;
427
var path = tempDir.
Path
;
454
File.WriteAllText(Path.Join(tempDir.
Path
, "Dockerfile"), "this does not matter");
Publishing\ResourceContainerImageManagerTests.cs (4)
270
ctx.OutputPath = Path.Combine(tempDir.
Path
, "NewFolder"); // tests that the folder is created if it doesn't exist
860
var tempSecretFile = System.IO.Path.Combine(tempDir.
Path
, ".npmrc");
1210
ctx.OutputPath = Path.Combine(tempDir.
Path
, "archives");
1332
ctx.OutputPath = Path.Combine(tempDir.
Path
, "archives");
tests\Shared\TempDirectory.cs (1)
12
Directory.Delete(
Path
, recursive: true);
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (6)
148
var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.
Path
);
163
var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.
Path
);
177
var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.
Path
);
189
var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.
Path
);
193
Assert.Contains(tempDir.
Path
, annotation.ContextPath);
202
var yarp = builder.AddYarp("yarp").WithStaticFiles(tempDir.
Path
);
YarpConfigGeneratorTests.cs (2)
267
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, tempDir.
Path
);
292
var composeFile = Path.Combine(tempDir.
Path
, "docker-compose.yaml");