feature/tt/initial-implementation (#1)
Some checks failed
Gitea Docker Build Demo / Test (push) Successful in 2m24s
Gitea Docker Build Demo / Build_Image (push) Failing after 1m40s
Release / Test (release) Successful in 2m22s
Release / Build_Image (release) Failing after 44s

Reviewed-on: #1
Co-authored-by: Tobias Trabelsi <lerentis@uploadfilter24.eu>
Co-committed-by: Tobias Trabelsi <lerentis@uploadfilter24.eu>
This commit is contained in:
2025-10-06 09:21:57 +00:00
committed by lerentis
parent 33921aa992
commit e51594fdd7
17 changed files with 774 additions and 1 deletions

23
internal/health_test.go Normal file
View File

@@ -0,0 +1,23 @@
package internal
import (
"net/http"
"strings"
"testing"
)
func TestHealth(t *testing.T) {
go func() {
StartHealthEndpoint()
}()
request, _ := http.NewRequest(http.MethodGet, "http://localhost:8080/health", strings.NewReader(""))
resp, err := http.DefaultClient.Do(request)
if err != nil {
t.Errorf("Health endpoint did not start: %v", err)
}
if resp.StatusCode != http.StatusOK {
t.Errorf("Bad response from health endpoint. Want: %d, got %d", http.StatusOK, resp.StatusCode)
}
}