Skip to content

Commit 4ff2562

Browse files
Potential fix for pull request finding 'Call to System.IO.Path.Combine'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent a96222b commit 4ff2562

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/Elastic.Documentation.Services.Tests/ChangelogServiceTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,10 @@ public async Task CreateChangelog_WithPrOptionAndLabelMapping_MapsLabelsToType()
231231
A<CancellationToken>._))
232232
.Returns(prInfo);
233233

234-
var configDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
234+
var fs = new FileSystem();
235+
var configDir = fs.Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
235236
Directory.CreateDirectory(configDir);
236-
var configPath = Path.Combine(configDir, "changelog.yml");
237+
var configPath = fs.Path.Combine(configDir, "changelog.yml");
237238
var configContent = """
238239
available_types:
239240
- feature
@@ -257,7 +258,7 @@ public async Task CreateChangelog_WithPrOptionAndLabelMapping_MapsLabelsToType()
257258
Pr = "https://github.com/elastic/elasticsearch/pull/12345",
258259
Products = [new ProductInfo { Product = "elasticsearch", Target = "9.2.0" }],
259260
Config = configPath,
260-
Output = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString())
261+
Output = fs.Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString())
261262
};
262263

263264
// Act

0 commit comments

Comments
 (0)