diff --git a/internal/servers/controller/handler_test.go b/internal/servers/controller/handler_test.go index 323fe3eef..f20ad781c 100644 --- a/internal/servers/controller/handler_test.go +++ b/internal/servers/controller/handler_test.go @@ -5,11 +5,20 @@ import ( "net" "net/http" "testing" + + "github.com/hashicorp/vault/internalshared/configutil" + "github.com/hashicorp/watchtower/internal/cmd/base" + "github.com/hashicorp/watchtower/internal/cmd/config" ) func TestHandleGrpcGateway(t *testing.T) { - var c Controller - h := c.handler(HandlerProperties{}) + c := &Controller{ + conf: &Config{ + Server: new(base.Server), + RawConfig: config.New(), + }, + } + h := c.handler(HandlerProperties{ListenerConfig: new(configutil.Listener)}) l, err := net.Listen("tcp4", "127.0.0.1:0") if err != nil { t.Fatalf("Couldn't listen: %v", err) @@ -48,4 +57,3 @@ func TestHandleGrpcGateway(t *testing.T) { }) } } -