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
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user