mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
26 lines
430 B
Go
26 lines
430 B
Go
|
package terraform
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/hashicorp/terraform/addrs"
|
||
|
"github.com/hashicorp/terraform/configs"
|
||
|
)
|
||
|
|
||
|
func TestNodeRootVariableExecute(t *testing.T) {
|
||
|
ctx := new(MockEvalContext)
|
||
|
|
||
|
n := &NodeRootVariable{
|
||
|
Addr: addrs.InputVariable{Name: "foo"},
|
||
|
Config: &configs.Variable{
|
||
|
Name: "foo",
|
||
|
},
|
||
|
}
|
||
|
|
||
|
err := n.Execute(ctx, walkApply)
|
||
|
if err != nil {
|
||
|
t.Fatalf("unexpected error: %s", err.Error())
|
||
|
}
|
||
|
|
||
|
}
|