Skip to content

Commit 81585e2

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
add test tracing
1 parent 7509434 commit 81585e2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

dsc/src/mcp/mcp_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ impl McpServer {
2222
Self {
2323
tool_router:
2424
Self::invoke_dsc_resource_router()
25+
+ Self::list_dsc_functions_router()
2526
+ Self::list_dsc_resources_router()
2627
+ Self::show_dsc_resource_router()
27-
+ Self::list_dsc_functions_router(),
2828
}
2929
}
3030
}

dsc/tests/dsc_mcp.tests.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ Describe 'Tests for MCP server' {
1717
$mcp.StandardInput.WriteLine($request)
1818
$mcp.StandardInput.Flush()
1919
if (!$notify) {
20+
write-verbose -verbose "peeking stdout"
2021
while ($mcp.StandardOutput.Peek() -eq -1) {
2122
Start-Sleep -Milliseconds 100
2223
}
24+
write-verbose -verbose "peeking stderr"
25+
while ($mcp.StandardError.Peek() -ne -1) {
26+
$stderr = $mcp.StandardError.ReadLine()
27+
Write-Verbose -Verbose "MCP STDERR: $stderr"
28+
}
29+
write-verbose -verbose "reading stdout"
2330
$stdout = $mcp.StandardOutput.ReadLine()
2431
return ($stdout | ConvertFrom-Json -Depth 30)
2532
}
@@ -163,7 +170,9 @@ Describe 'Tests for MCP server' {
163170
}
164171

165172
It 'Calling show_dsc_resource works' {
173+
write-verbose -verbose "Listing resources to get a resource type"
166174
$resource = (dsc resource list | Select-Object -First 1 | ConvertFrom-Json -Depth 20)
175+
write-verbose -verbose "Using resource type '$($resource.type)' for show_dsc_resource test"
167176

168177
$mcpRequest = @{
169178
jsonrpc = "2.0"

0 commit comments

Comments
 (0)