From 1b19afaa339f2f68520d61b634600ddeb04effb7 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sat, 21 Feb 2026 11:14:42 +0100 Subject: Split up the rendering from the logic --- test/http.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/http.c') diff --git a/test/http.c b/test/http.c index 97f7a6b..0d18242 100644 --- a/test/http.c +++ b/test/http.c @@ -1,3 +1,4 @@ +#include "app.h" #include "web.h" #include "mytime.h" @@ -50,7 +51,7 @@ int main(int argc, char **argv) { struct App app = { .dbname = "file::memory:?cache=shared", }; - prepare_database(&app); + app_startup(&app); struct Server server = { .app = &app, }; @@ -320,16 +321,15 @@ int main(int argc, char **argv) { assert(code == 204); body = (struct memory){0}; - // Use internal function to verify backup statuses - struct Request req = { .server = &server }; + // Use app layer functions to verify backup statuses struct GetClientOnlyResult client_result; - int ret = get_client(&req, 1, &client_result); + int ret = get_client(&app, 1, &client_result); assert(ret == 0); assert(client_result.found == 1); struct GetBackupsResult *backups_result = malloc(sizeof(struct GetBackupsResult) + sizeof(struct BackupRecord) * MAX_BACKUPS_DISPLAY); backups_result->backups_len = MAX_BACKUPS_DISPLAY; - ret = get_client_backups(&req, 1, backups_result); + ret = get_client_backups(&app, 1, backups_result); assert(ret == 0); // Should have at least 2 backups (the interrupted one and the running one) -- cgit v1.2.3