feat(ssh): Support authless SSH health check (#956)
* Feature + Test + Documentation: added no-auth ssh health cheack feature, changed documentation to fit new behavior, added ssh test cases. * Refactor: refactored authenticate field to infer from username and password insted of specifying it inside config. * Refactor: removed non used field. * Refactor: changed error, removed spaces. * Refactor: added comments.
This commit is contained in:
@ -7,10 +7,8 @@ import (
|
||||
|
||||
func TestSSH_validate(t *testing.T) {
|
||||
cfg := &Config{}
|
||||
if err := cfg.Validate(); err == nil {
|
||||
t.Error("expected an error")
|
||||
} else if !errors.Is(err, ErrEndpointWithoutSSHUsername) {
|
||||
t.Errorf("expected error to be '%v', got '%v'", ErrEndpointWithoutSSHUsername, err)
|
||||
if err := cfg.Validate(); err != nil {
|
||||
t.Error("didn't expect an error")
|
||||
}
|
||||
cfg.Username = "username"
|
||||
if err := cfg.Validate(); err == nil {
|
||||
|
Reference in New Issue
Block a user