diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2026-02-21 11:14:42 +0100 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2026-02-21 11:14:42 +0100 |
| commit | 1b19afaa339f2f68520d61b634600ddeb04effb7 (patch) | |
| tree | 232ec9fdc03a8955a8c847b88a688306689d2633 /test/http.c | |
| parent | 0b6e8026a6b530c7d88607bfdf79b9692987abaa (diff) | |
Split up the rendering from the logic
Diffstat (limited to 'test/http.c')
| -rw-r--r-- | test/http.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) |
