mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
a49e7eee8b
This is a partial copy of the terraform package to preserve the legacy types for internal use.
28 lines
471 B
Go
28 lines
471 B
Go
package terraform
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestPrefixUIInput_impl(t *testing.T) {
|
|
var _ UIInput = new(PrefixUIInput)
|
|
}
|
|
|
|
func TestPrefixUIInput(t *testing.T) {
|
|
input := new(MockUIInput)
|
|
prefix := &PrefixUIInput{
|
|
IdPrefix: "foo",
|
|
UIInput: input,
|
|
}
|
|
|
|
_, err := prefix.Input(context.Background(), &InputOpts{Id: "bar"})
|
|
if err != nil {
|
|
t.Fatalf("err: %s", err)
|
|
}
|
|
|
|
if input.InputOpts.Id != "foo.bar" {
|
|
t.Fatalf("bad: %#v", input.InputOpts)
|
|
}
|
|
}
|