Skip to content

Commit 4994bc7

Browse files
authored
fix test does not open browser (#1434)
1 parent 4d22684 commit 4994bc7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pkg/mcp/tools/deploy_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ func TestHandleDeployTool(t *testing.T) {
219219

220220
for _, tt := range tests {
221221
t.Run(tt.name, func(t *testing.T) {
222+
var originalOpenURLFunc = OpenURLFunc
223+
OpenURLFunc = func(url string) error {
224+
// Mock implementation that doesn't actually open a browser
225+
return nil
226+
}
227+
defer func() { OpenURLFunc = originalOpenURLFunc }()
228+
222229
// Create mock and configure it
223230
mockCLI := &MockDeployCLI{
224231
CallLog: []string{},

0 commit comments

Comments
 (0)