Add service orchestration and web UI
This commit is contained in:
24
internal/service/service_test.go
Normal file
24
internal/service/service_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestStatusHandler(t *testing.T) {
|
||||
svc := &Service{}
|
||||
|
||||
req := httptest.NewRequest(http.MethodGet, "/status", nil)
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
svc.status(w, req)
|
||||
|
||||
if w.Code != http.StatusOK {
|
||||
t.Errorf(
|
||||
"status handler returned %d, want %d",
|
||||
w.Code,
|
||||
http.StatusOK,
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user