updated http library to return error and response structs; updated how the GUI works to have a 'wait' UI; updated Makefile to ensure API is started before starting GUI
CI / Detect changed paths (pull_request) Successful in 3s
CI / Odin unit tests and build (pull_request) Successful in 1m4s
CI / API unit tests and lint (pull_request) Failing after 1m14s
CI / Infra unit tests, vet, and preview (pull_request) Successful in 45s

This commit is contained in:
2026-09-13 00:52:02 -06:00
parent 39cb53ea8a
commit de842fdc2d
8 changed files with 684 additions and 63 deletions
+5 -4
View File
@@ -65,11 +65,12 @@ test_http_get_request :: proc(t: ^testing.T) {
url := fmt.bprintf(url_buf[:], "http://127.0.0.1:%d/", bound.port)
log.infof("requesting %s", url)
body, ok := http.http_get(url)
if !testing.expect(t, ok, "http_get returned ok=false") {
resp, req_err := http.http_get(url)
if !testing.expect(t, req_err == nil, "http_get returned an error") {
return
}
defer delete(body)
defer delete(resp.body)
testing.expectf(t, body == SERVER_BODY, "expected %q, got %q", SERVER_BODY, body)
testing.expectf(t, resp.status == 200, "expected status 200, got %d", resp.status)
testing.expectf(t, resp.body == SERVER_BODY, "expected %q, got %q", SERVER_BODY, resp.body)
}