211 references to Path
Aspire.Cli.Tests (211)
Acquisition\InstallSidecarWriterTests.cs (14)
15
var sidecarPath = Path.Combine(workspace.
Path
, InstallSidecarReader.SidecarFileName);
28
using var update = InstallSidecarWriter.PrepareForSelfUpdate(workspace.
Path
, "staging");
44
Assert.Empty(Directory.GetFiles(workspace.
Path
, $"{InstallSidecarReader.SidecarFileName}.*.tmp"));
52
using var update = InstallSidecarWriter.PrepareForSelfUpdate(workspace.
Path
, "daily");
54
var sidecarPath = Path.Combine(workspace.
Path
, InstallSidecarReader.SidecarFileName);
63
var sidecarPath = Path.Combine(workspace.
Path
, InstallSidecarReader.SidecarFileName);
67
Assert.ThrowsAny<JsonException>(() => InstallSidecarWriter.PrepareForSelfUpdate(workspace.
Path
, "staging"));
70
Assert.Empty(Directory.GetFiles(workspace.
Path
, $"{InstallSidecarReader.SidecarFileName}.*.tmp"));
77
var sidecarPath = Path.Combine(workspace.
Path
, InstallSidecarReader.SidecarFileName);
86
() => InstallSidecarWriter.PrepareForSelfUpdate(workspace.
Path
, "staging"));
90
Assert.Empty(Directory.GetFiles(workspace.
Path
, $"{InstallSidecarReader.SidecarFileName}.*.tmp"));
97
var sidecarPath = Path.Combine(workspace.
Path
, InstallSidecarReader.SidecarFileName);
101
InstallSidecarWriter.PrepareForSelfUpdate(workspace.
Path
, "staging")!.Dispose();
104
Assert.Empty(Directory.GetFiles(workspace.
Path
, $"{InstallSidecarReader.SidecarFileName}.*.tmp"));
Acquisition\WingetRegistryProbeTests.cs (8)
23
probe.Run(workspace.
Path
);
25
var sidecarPath = Path.Combine(workspace.
Path
, SidecarFileName);
36
Assert.Empty(Directory.GetFiles(workspace.
Path
));
44
var sidecarPath = Path.Combine(workspace.
Path
, SidecarFileName);
57
probe.Run(workspace.
Path
);
76
probe.Run(workspace.
Path
);
89
var sidecarPath = Path.Combine(workspace.
Path
, SidecarFileName);
93
var leftovers = Directory.GetFiles(workspace.
Path
, $"{SidecarFileName}.*.tmp");
Agents\TelemetryHookConfiguratorTests.cs (2)
209
: Path.Combine(workspace.
Path
, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
214
["args"] = new JsonArray(Path.Combine(workspace.
Path
, assemblyName), "agent", "telemetry", "--hook")
BundleServiceComputeDefaultExtractDirTests.cs (7)
32
var prefixDir = Path.Combine(workspace.
Path
, "aspire");
55
var prDir = Path.Combine(workspace.
Path
, "dogfood", "pr-12345");
76
var installDir = Path.Combine(workspace.
Path
, "WindowsApps", "Microsoft.Aspire_8wekyb3d8bbwe");
103
var cellarDir = Path.Combine(workspace.
Path
, "Caskroom", "aspire", "13.2.0");
109
var brewBinDir = Path.Combine(workspace.
Path
, "bin");
131
workspace.
Path
,
160
var prefixDir = Path.Combine(workspace.
Path
, "nix", "store", "aspire");
Certificates\DeveloperCertificateCacheWriteTests.cs (3)
22
options.StartInfo.Environment["HOME"] = workspace.
Path
;
23
options.StartInfo.Environment["USERPROFILE"] = workspace.
Path
;
50
}, workspace.
Path
, options).Dispose();
Commands\CompletionsCommandTests.cs (9)
263
"legacy-local" => ConfigurationHelper.BuildPathToSettingsJsonFile(workspace.
Path
),
264
_ => Path.Combine(workspace.
Path
, AspireConfigFile.FileName)
273
var originalFiles = Directory.GetFiles(workspace.
Path
, "*", SearchOption.AllDirectories)
275
var originalDirectories = Directory.GetDirectories(workspace.
Path
, "*", SearchOption.AllDirectories).Order().ToArray();
277
options.StartInfo.WorkingDirectory = workspace.
Path
;
318
Assert.Equal(originalFiles.Keys.Order(), Directory.GetFiles(workspace.
Path
, "*", SearchOption.AllDirectories).Order());
319
Assert.Equal(originalDirectories, Directory.GetDirectories(workspace.
Path
, "*", SearchOption.AllDirectories).Order());
333
var settingsPath = Path.Combine(workspace.
Path
, AspireConfigFile.FileName);
337
options.StartInfo.WorkingDirectory = workspace.
Path
;
Commands\InitCommandTests.cs (3)
478
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "apphost.mts"), "console.log('existing AppHost');");
481
var originalFiles = Directory.GetFiles(workspace.
Path
, "*", SearchOption.AllDirectories)
524
var projectFiles = Directory.GetFiles(workspace.
Path
, "*", SearchOption.AllDirectories).Where(path => path != logFilePath);
Commands\SdkDumpCommandTests.cs (2)
257
var repoRoot = AspireRepositoryDetector.DetectRepositoryRoot(workspace.
Path
);
277
Path.Combine(workspace.
Path
, "output"), "Aspire.Hosting.Redis@13.2.0"]);
Configuration\ConfigurationHelperTests.cs (4)
131
"legacy-local" => ConfigurationHelper.BuildPathToSettingsJsonFile(workspace.
Path
),
132
_ => Path.Combine(workspace.
Path
, AspireConfigFile.FileName)
154
var originalFiles = Directory.GetFiles(workspace.
Path
, "*", SearchOption.AllDirectories)
178
Assert.Equal(originalFiles.Keys.Order(), Directory.GetFiles(workspace.
Path
, "*", SearchOption.AllDirectories).Order());
HeldFileLeaseTests.cs (5)
57
var leaseDirectory = Path.Combine(workspace.
Path
, "missing");
79
var readyPath = Path.Combine(workspace.
Path
, "ready");
80
var releasePath = Path.Combine(workspace.
Path
, "release");
135
var readyPath = Path.Combine(workspace.
Path
, "ready");
136
var releasePath = Path.Combine(workspace.
Path
, "release");
Npm\AspireJsLauncherTests.cs (9)
25
var layout = CreateFakeNpmLayout(workspace.
Path
, pointerVersion, rid, ridPackageName, ridPackageVersion);
43
var layout = CreateFakeNpmLayout(workspace.
Path
, pointerVersion, rid, ridPackageName, pointerVersion);
64
var layout = CreateFakeNpmLayout(workspace.
Path
, pointerVersion, rid, ridPackageName, pointerVersion);
66
var monkeyPatchScript = Path.Combine(workspace.
Path
, "patch-chmod.js");
93
var layout = CreateFakeNpmLayout(workspace.
Path
, pointerVersion, rid, ridPackageName, pointerVersion);
95
var monkeyPatchScript = Path.Combine(workspace.
Path
, "patch-copy.js");
122
var layout = CreateFakeNpmLayout(workspace.
Path
, pointerVersion, rid, ridPackageName, pointerVersion);
150
var probeScript = Path.Combine(workspace.
Path
, "detect-rids.js");
169
var probeScript = Path.Combine(workspace.
Path
, "detect-current-rid.js");
Projects\AppHostServerProjectTests.cs (1)
55
var parentConfigPath = Path.Combine(_workspace.
Path
, "NuGet.Config");
Projects\DefaultLanguageDiscoveryTests.cs (2)
196
var appHostPath = Path.Combine(workspace.
Path
, relativePath.Replace('/', Path.DirectorySeparatorChar));
203
var located = java.FindInDirectory(workspace.
Path
);
Projects\GuestRuntimeTests.cs (5)
282
var directory = new DirectoryInfo(workspace.
Path
);
976
new DirectoryInfo(workspace.
Path
),
982
new DirectoryInfo(workspace.
Path
),
1137
var tempDir = workspace.
Path
;
1180
var tempDir = workspace.
Path
;
Projects\JavaAppHostToolchainResolverTests.cs (58)
84
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
95
File.WriteAllText(Path.Combine(workspace.
Path
, buildFileName), "");
104
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
105
File.WriteAllText(Path.Combine(workspace.
Path
, "build.gradle"), "");
114
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
138
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
139
var wrapper = WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw");
147
workspace.
Path
,
186
File.WriteAllText(Path.Combine(workspace.
Path
, buildFileName), "");
187
WriteWrapper(workspace.
Path
, buildFileName == "pom.xml"
243
File.WriteAllText(Path.Combine(workspace.
Path
, "build.gradle"), "");
244
var wrapper = WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "gradlew.bat" : "gradlew");
251
workspace.
Path
,
281
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
282
WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw");
315
var wrapperPath = Path.Combine(workspace.
Path
, expectedWrapper);
350
WriteBuildRootMarker(workspace.
Path
, useMaven);
352
var rootWrapperPath = Path.Combine(workspace.
Path
, expectedWrapper);
355
var moduleDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "apphost"));
375
var appHostDirectory = CreateMavenReactor(workspace.
Path
);
376
var localRepository = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "empty-maven-repository"));
386
Path.Combine(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
410
Path.Combine(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
441
var appHostDirectory = CreateIndependentMavenReactor(workspace.
Path
);
442
var localRepository = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "empty-maven-repository"));
452
Path.Combine(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
480
Path.Combine(workspace.
Path
, "pom.xml"),
482
var wrapperPath = WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw");
484
var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "standalone"));
692
WriteBuildRootMarker(workspace.
Path
, useMaven);
693
File.WriteAllText(Path.Combine(workspace.
Path
, OperatingSystem.IsWindows() ? windowsWrapperName : wrapperName), "");
695
var innerCheckout = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "inner"));
721
File.WriteAllText(Path.Combine(workspace.
Path
, "build.gradle"), "");
722
WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "gradlew.bat" : "gradlew");
723
var scriptPath = Path.Combine(workspace.
Path
, ".aspire", "aspire-gradle-init.gradle");
740
File.WriteAllText(Path.Combine(workspace.
Path
, "build.gradle"), "");
741
WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "gradlew.bat" : "gradlew");
745
var script = await File.ReadAllTextAsync(Path.Combine(workspace.
Path
, ".aspire", "aspire-gradle-init.gradle"));
756
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
758
var dependencyDirectory = Path.Combine(workspace.
Path
, "target", "aspire-deps");
773
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
777
Assert.False(Directory.Exists(Path.Combine(workspace.
Path
, "target")));
784
File.WriteAllText(Path.Combine(workspace.
Path
, "build.gradle"), "");
785
WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "gradlew.bat" : "gradlew");
787
var dependencyDirectory = Path.Combine(workspace.
Path
, "build", "aspire-deps");
806
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
823
File.WriteAllText(Path.Combine(workspace.
Path
, buildFileName), "");
824
var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "src", "main", "java"));
831
Assert.Equal(workspace.
Path
, resolution.ProjectDirectory.FullName);
838
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
839
var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "a", "b", "c"));
848
File.WriteAllText(Path.Combine(workspace.
Path
, "pom.xml"), "<project />");
849
WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw");
850
var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "src", "main", "java"));
890
File.WriteAllText(Path.Combine(workspace.
Path
, "build.gradle"), "");
891
WriteWrapper(workspace.
Path
, OperatingSystem.IsWindows() ? "gradlew.bat" : "gradlew");
892
var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.
Path
, "src", "main", "java"));
899
var scriptPath = Path.Combine(workspace.
Path
, ".aspire", "aspire-gradle-init.gradle");
Telemetry\AgentTelemetryPersistenceTests.cs (2)
116
var lockPath = Path.Combine(workspace.
Path
, "uploader.lock");
295
}, workspace.
Path
, isAgentTelemetryInvocation.ToString());
Telemetry\AgentTelemetryUploaderTests.cs (4)
18
var lockPath = Path.Combine(workspace.
Path
, "uploader.lock");
42
var lockPath = Path.Combine(workspace.
Path
, "uploader.lock");
45
await AgentTelemetryUploader.DrainAsync(workspace.
Path
, lockPath, CancellationToken.None).DefaultTimeout();
54
var lockPath = Path.Combine(workspace.
Path
, "uploader.lock");
Telemetry\InternalMicrosoftDetectorTests.cs (66)
43
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
85
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
111
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
135
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
174
Path.Combine(workspace.
Path
, "cache", "detector.json"),
210
Path.Combine(workspace.
Path
, "cache", "detector.json"),
256
Path.Combine(workspace.
Path
, "cache", "detector.json"),
286
Path.Combine(workspace.
Path
, "cache", "detector.json"),
329
Path.Combine(workspace.
Path
, "cache", "detector.json"),
356
Path.Combine(workspace.
Path
, "cache", "detector.json"),
372
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
391
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
418
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
441
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
467
Path.Combine(workspace.
Path
, "cache", "detector.json"),
490
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
524
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
563
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
589
Path.Combine(workspace.
Path
, "cache", "detector.json"),
610
Path.Combine(workspace.
Path
, "cache", "detector.json"),
630
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd"), string.Empty);
631
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd.EXE"), string.Empty);
642
Path.Combine(workspace.
Path
, "cache", "detector.json"),
648
["PATH"] = workspace.
Path
,
668
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd"), string.Empty);
669
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd.EXE"), string.Empty);
679
Path.Combine(workspace.
Path
, "cache", "detector.json"),
685
["PATH"] = workspace.
Path
,
702
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd"), string.Empty);
703
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd.EXE"), string.Empty);
710
Path.Combine(workspace.
Path
, "cache", "detector.json"),
716
["PATH"] = workspace.
Path
,
849
var appSsoPath = Path.Combine(workspace.
Path
, "usr", "bin", "app-sso");
871
Path.Combine(workspace.
Path
, "cache", "detector.json"),
890
Path.Combine(workspace.
Path
, "cache", "detector.json"),
893
macPlatformSsoPath: Path.Combine(workspace.
Path
, "missing-app-sso"));
906
var appSsoPath = Path.Combine(workspace.
Path
, "app-sso");
936
Path.Combine(workspace.
Path
, "cache", "detector.json"),
950
Path.Combine(workspace.
Path
, "full-detector-cache", "detector.json"),
1023
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1044
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd"), string.Empty);
1045
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, "dsregcmd.EXE"), string.Empty);
1051
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1057
["PATH"] = workspace.
Path
,
1075
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, executable), string.Empty);
1082
["PATH"] = workspace.
Path
1085
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1106
await File.WriteAllTextAsync(Path.Combine(workspace.
Path
, executable), string.Empty);
1113
["PATH"] = workspace.
Path
1116
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1140
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1165
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1182
var cacheFilePath = Path.Combine(workspace.
Path
, "cache", "detector.json");
1213
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1237
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1261
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1285
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1308
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1313
["PATH"] = workspace.
Path
,
1337
environmentVariables["PATH"] = workspace.
Path
;
1340
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1365
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1571
environmentVariables["PATH"] = workspace.
Path
;
1574
Path.Combine(workspace.
Path
, "cache", "detector.json"),
1621
environmentVariables["PATH"] = workspace.
Path
;
1624
Path.Combine(workspace.
Path
, "cache", "detector.json"),
tests\Shared\TemporaryWorkspace.cs (1)
245
var aspireDir = IOPath.Combine(workspace.
Path
, ".aspire");
Utils\DcpConnectionHealthCheckTests.cs (3)
290
options.StartInfo.Environment["HOME"] = workspace.
Path
;
291
options.StartInfo.Environment["USERPROFILE"] = workspace.
Path
;
312
}, workspace.
Path
, options).Dispose();
Utils\DotNetToolDetectionTests.cs (3)
27
var toolPath = Path.Combine(workspace.
Path
, "custom tool path");
54
var toolPath = Path.Combine(workspace.
Path
, "custom tool path");
82
var processPath = Path.Combine(workspace.
Path
, GetAspireExecutableName());