fix: harden profile imports and release dependencies

This commit is contained in:
Andy Dixon
2026-06-15 19:39:16 +01:00
parent b2fc84846c
commit 9bbd9ceccf
20 changed files with 1493 additions and 135 deletions
+10
View File
@@ -9,6 +9,16 @@ import (
"golang.org/x/crypto/ssh"
)
func TestConnectRequiresHostKeyCallback(t *testing.T) {
profile := models.NewProfile(models.ProtocolSSH)
client := NewClient(&profile)
err := client.Connect(nil, nil)
if err == nil {
t.Fatal("expected Connect to reject missing host key callback")
}
}
func TestJumpHostClientConfigUsesFinalHostKeyCallback(t *testing.T) {
called := false
hostKeyCallback := func(hostname string, _ net.Addr, _ ssh.PublicKey) error {