Commit 2de5989e authored by Alex Dadgar's avatar Alex Dadgar
Browse files

vet

parent 1736d934
Showing with 16 additions and 15 deletions
+16 -15
......@@ -33,7 +33,10 @@ type PluginBase struct {
}
func (p *PluginBase) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
proto.RegisterBasePluginServer(s, &basePluginServer{impl: p.impl})
proto.RegisterBasePluginServer(s, &basePluginServer{
impl: p.impl,
broker: broker,
})
return nil
}
......
......@@ -16,27 +16,27 @@ var (
// testSpec is an hcl Spec for testing
testSpec = &hclspec.Spec{
Block: &hclspec.Spec_Object{
&hclspec.Object{
Object: &hclspec.Object{
Attributes: map[string]*hclspec.Spec{
"foo": &hclspec.Spec{
"foo": {
Block: &hclspec.Spec_Attr{
&hclspec.Attr{
Attr: &hclspec.Attr{
Type: "string",
Required: false,
},
},
},
"bar": &hclspec.Spec{
"bar": {
Block: &hclspec.Spec_Attr{
&hclspec.Attr{
Attr: &hclspec.Attr{
Type: "number",
Required: true,
},
},
},
"baz": &hclspec.Spec{
"baz": {
Block: &hclspec.Spec_Attr{
&hclspec.Attr{
Attr: &hclspec.Attr{
Type: "bool",
},
},
......
......@@ -82,8 +82,6 @@ func decodeSpecBlock(spec *Spec, impliedName string) (hcldec.Spec, hcl.Diagnosti
})
return nil, diags
}
return nil, nil
}
func decodeObjectSpec(obj *Object) (hcldec.Spec, hcl.Diagnostics) {
......
......@@ -46,7 +46,7 @@ func TestDec_Convert_Object(t *testing.T) {
Block: &Spec_Object{
&Object{
Attributes: map[string]*Spec{
"foo": &Spec{
"foo": {
Block: &Spec_Attr{
&Attr{
Type: "string",
......@@ -54,7 +54,7 @@ func TestDec_Convert_Object(t *testing.T) {
},
},
},
"bar": &Spec{
"bar": {
Block: &Spec_Attr{
&Attr{
Type: "number",
......@@ -62,7 +62,7 @@ func TestDec_Convert_Object(t *testing.T) {
},
},
},
"baz": &Spec{
"baz": {
Block: &Spec_Attr{
&Attr{
Type: "bool",
......@@ -106,7 +106,7 @@ func TestDec_Convert_Array(t *testing.T) {
Block: &Spec_Array{
Array: &Array{
Values: []*Spec{
&Spec{
{
Block: &Spec_Attr{
&Attr{
Name: "foo",
......@@ -115,7 +115,7 @@ func TestDec_Convert_Array(t *testing.T) {
},
},
},
&Spec{
{
Block: &Spec_Attr{
&Attr{
Name: "bar",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment