waveterm/pkg/remote/sshagent_windows_test.go
Andy_Allan f622c658b0
feat: implement SSH agent for Windows with tests (#2644)
#2643 

## Implementation
1. Add platform-aware identity-agent dialing: on Window, default to `//./pipe/openssh-ssh-agent`.
2. Keep Unix agent dialing via Unix sockets; unify agent resolution
across platforms.
3. Add cross-platform unit tests covering dialer selection and failure
paths.
2025-12-15 11:05:11 -08:00

21 lines
532 B
Go

//go:build windows
package remote
import (
"testing"
"time"
)
func TestDialIdentityAgentWindowsTimeout(t *testing.T) {
start := time.Now()
_, err := dialIdentityAgent(`\\.\\pipe\\waveterm-nonexistent-agent`)
if err == nil {
t.Skip("unexpectedly connected to a test pipe; skipping")
}
// Optionally verify error indicates connection/timeout failure
t.Logf("dialIdentityAgent returned expected error: %v", err)
if time.Since(start) > 3*time.Second {
t.Fatalf("dialIdentityAgent exceeded expected timeout window")
}
}