Skip to content

Commit 74267f0

Browse files
yotsudaclaude
andcommitted
Fix unit tests: remove GenerateAgentId tests and use valid agent_id
Remove tests for deleted GenerateAgentId method. Change TestAgentId from "test-agent" to "default" so tests pass agent_id validation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 330171a commit 74267f0

1 file changed

Lines changed: 2 additions & 21 deletions

File tree

Tests/Unit/Proxy/PowerShellToolsTests.cs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,15 @@ public class PowerShellToolsTests
1717
{
1818
private readonly Mock<IPowerShellService> _mockPowerShellService;
1919
private readonly Mock<IPipeDiscoveryService> _mockPipeDiscoveryService;
20-
private const string TestAgentId = "test-agent";
21-
private const string TestPipeName = "PSMCP.1000.test-agent.2000";
20+
private const string TestAgentId = "default";
21+
private const string TestPipeName = "PSMCP.1000.default.2000";
2222

2323
public PowerShellToolsTests()
2424
{
2525
_mockPowerShellService = new Mock<IPowerShellService>();
2626
_mockPipeDiscoveryService = new Mock<IPipeDiscoveryService>();
2727
}
2828

29-
#region GenerateAgentId Tests
30-
31-
[Fact]
32-
public void GenerateAgentId_ReturnsEightCharHexString()
33-
{
34-
var id = PowerShellTools.GenerateAgentId();
35-
Assert.Equal(8, id.Length);
36-
Assert.Matches("^[0-9a-f]{8}$", id);
37-
}
38-
39-
[Fact]
40-
public void GenerateAgentId_ReturnsUniqueValues()
41-
{
42-
var ids = Enumerable.Range(0, 100).Select(_ => PowerShellTools.GenerateAgentId()).ToList();
43-
Assert.Equal(ids.Count, ids.Distinct().Count());
44-
}
45-
46-
#endregion
47-
4829
#region GetCurrentLocation Tests
4930

5031
[Fact]

0 commit comments

Comments
 (0)