()
| 467 | } |
| 468 | |
| 469 | func createSSHContext() *ssh.SSHContext { |
| 470 | return &ssh.SSHContext{ |
| 471 | AskForSudoPassword: askForSudoPasswd, |
| 472 | GetSudoPasswordCommand: passCmd, |
| 473 | IdentityFile: os.Getenv("SSH_IDENTITY_FILE"), |
| 474 | DefaultUsername: os.Getenv("SSH_USER"), |
| 475 | SkipHostKeyCheck: os.Getenv("SSH_SKIP_HOST_KEY_CHECK") != "", |
| 476 | ConfigFile: os.Getenv("SSH_CONFIG_FILE"), |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | func execHealthCheck(hosts []nix.Host) error { |
| 481 | sshContext := createSSHContext() |
no outgoing calls
no test coverage detected