Skip to content

Commit d2d5cbe

Browse files
authored
Fixed requiredSSHHost (#34)
Signed-off-by: vadimartynov <vadim.martynov@flant.com>
1 parent d112132 commit d2d5cbe

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/ssh/config/parse_config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ var supportedKinds = []string{sshConfigKind, sshHostKind}
3838

3939
func ParseConnectionConfig(reader io.Reader, sett settings.Settings, opts ...ValidateOption) (*ConnectionConfig, error) {
4040
options := &validateOptions{
41-
requiredSSHHost: true,
4241
strictUnmarshal: true,
4342
}
4443
for _, o := range opts {

pkg/ssh/config/parse_config_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ sshBastionPassword: "not_secure_password_bastion"
294294
name: "with hosts: no hosts passed",
295295
input: generateConfigWithKeys(t, validPrivateKeys, ""),
296296
hasErrorContains: `at least one "SSHHost" required`,
297+
opts: []ValidateOption{
298+
ParseWithRequiredSSHHost(true),
299+
},
297300
},
298301

299302
{

0 commit comments

Comments
 (0)