mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-22 12:02:11 -04:00
19 lines
373 B
Go
19 lines
373 B
Go
package ssh
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestPasswordKeybardInteractive_Challenge(t *testing.T) {
|
|
p := PasswordKeyboardInteractive("foo")
|
|
result, err := p("foo", "bar", []string{"one", "two"}, nil)
|
|
if err != nil {
|
|
t.Fatalf("err not nil: %s", err)
|
|
}
|
|
|
|
if !reflect.DeepEqual(result, []string{"foo", "foo"}) {
|
|
t.Fatalf("invalid password: %#v", result)
|
|
}
|
|
}
|