diff --git a/nucleus/controller.go b/nucleus/controller.go index a633e4168090a3d87752c4461512097a726e3cec..e8fb8413c499a85ae435c9c65a6c9474cf9f0cf5 100644 --- a/nucleus/controller.go +++ b/nucleus/controller.go @@ -47,6 +47,7 @@ func initialize() error { } // TODO: Start grpc listener here + return httpAPI() } diff --git a/nucleus/http_test.go b/nucleus/http_test.go index 00195b43e021b487932a85c6ec31db90ae26a3c4..35ce78254d7ddd76f322f136988c460c913d9128 100644 --- a/nucleus/http_test.go +++ b/nucleus/http_test.go @@ -36,10 +36,6 @@ func testSetupHTTP() { if err := c.pndc.add(pnd); err != nil { log.Fatal(err) } - if err := httpAPI(); err != nil { - log.Fatal(err) - return - } } func Test_httpApi(t *testing.T) { @@ -141,6 +137,10 @@ func Test_httpApi(t *testing.T) { wantErr: false, }, } + if err := httpAPI(); err != nil { + t.Errorf("httpApi() error = %v", err) + return + } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := http.Get(tt.request)