comparison mrjunejune/test/integration_test.c @ 168:f3084bca7317

[Misc] Fixed all errors and all tests should pass now.
author MrJuneJune <me@mrjunejune.com>
date Mon, 19 Jan 2026 16:29:02 -0800
parents 7eb79fd91c7e
children
comparison
equal deleted inserted replaced
167:589bab390fb4 168:f3084bca7317
284 284
285 Seobeo_Client_Response *p_resp = Seobeo_Client_Request_Execute(p_req); 285 Seobeo_Client_Response *p_resp = Seobeo_Client_Request_Execute(p_req);
286 free(file_data); 286 free(file_data);
287 287
288 if (!p_resp || p_resp->status_code != 200) { 288 if (!p_resp || p_resp->status_code != 200) {
289 printf(" ✗ Conversion failed with status: %d\n", p_resp ? p_resp->status_code : 0); 289 printf(" ✗ Conversion failed with status: %d, %s\n", p_resp ? p_resp->status_code : 0, p_resp->body);
290 if (p_resp) Seobeo_Client_Response_Destroy(p_resp); 290 if (p_resp) Seobeo_Client_Response_Destroy(p_resp);
291
292 Seobeo_Client_Response_Destroy(p_resp);
293 Seobeo_Client_Request_Destroy(p_req); 291 Seobeo_Client_Request_Destroy(p_req);
294 return -1; 292 return -1;
295 } 293 }
296 294
297 // Extract download URL from JSON body 295 // Extract download URL from JSON body
305 303
306 printf(" ✓ Conversion succeeded. Download URL: %s\n", download_url_path); 304 printf(" ✓ Conversion succeeded. Download URL: %s\n", download_url_path);
307 Seobeo_Client_Response_Destroy(p_resp); 305 Seobeo_Client_Response_Destroy(p_resp);
308 Seobeo_Client_Request_Destroy(p_req); 306 Seobeo_Client_Request_Destroy(p_req);
309 307
308 usleep(100000);
310 printf(" → Testing download: GET %s\n", download_url_path); 309 printf(" → Testing download: GET %s\n", download_url_path);
311 char full_download_url[1024]; 310 char full_download_url[1024];
312 snprintf(full_download_url, sizeof(full_download_url), "%s%s", TEST_URL, download_url_path); 311 snprintf(full_download_url, sizeof(full_download_url), "%s%s", TEST_URL, download_url_path);
313 312
314 p_req = Seobeo_Client_Request_Create(full_download_url); 313 p_req = Seobeo_Client_Request_Create(full_download_url);
315 p_resp = Seobeo_Client_Request_Execute(p_req); 314 p_resp = Seobeo_Client_Request_Execute(p_req);
316 315
317 if (!p_resp || p_resp->status_code != 200) 316 if (!p_resp || p_resp->status_code != 200)
318 { 317 {
319 printf(" ✗ Download failed\n"); 318 printf(" ✗ Download failed\n");
319 printf("%s\n", p_resp->body);
320 if (p_resp) Seobeo_Client_Response_Destroy(p_resp); 320 if (p_resp) Seobeo_Client_Response_Destroy(p_resp);
321 Seobeo_Client_Request_Destroy(p_req); 321 Seobeo_Client_Request_Destroy(p_req);
322 return -1; 322 return -1;
323 } 323 }
324 324