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