mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-21 18:10:30 -04:00
21 lines
445 B
Go
21 lines
445 B
Go
// Copyright IBM Corp. 2014, 2026
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
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)
|
|
}
|
|
}
|