github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/not-internal/terraform/node_root_variable_test.go (about) 1 package terraform 2 3 import ( 4 "testing" 5 6 "github.com/muratcelep/terraform/not-internal/addrs" 7 "github.com/muratcelep/terraform/not-internal/configs" 8 "github.com/zclconf/go-cty/cty" 9 ) 10 11 func TestNodeRootVariableExecute(t *testing.T) { 12 ctx := new(MockEvalContext) 13 14 n := &NodeRootVariable{ 15 Addr: addrs.InputVariable{Name: "foo"}, 16 Config: &configs.Variable{ 17 Name: "foo", 18 Type: cty.String, 19 ConstraintType: cty.String, 20 }, 21 } 22 23 diags := n.Execute(ctx, walkApply) 24 if diags.HasErrors() { 25 t.Fatalf("unexpected error: %s", diags.Err()) 26 } 27 28 }