From a29738212841dcb699dc397ad66c3416324eccf8 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Thu, 26 Dec 2024 17:25:35 +0100 Subject: remove check_request_path because we have unveil --- test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test.c') diff --git a/test.c b/test.c index 802afc5..3738ced 100644 --- a/test.c +++ b/test.c @@ -3,6 +3,7 @@ #include "browse.h" #include "delete.h" +#include "download.h" #include "http.h" #include "upload.h" #include "url.h" @@ -91,6 +92,23 @@ test_upload_post() return 0; } +static char * +test_download() +{ + struct kreq r; + struct http_ret ret; + + r = (struct kreq) { + .pname = "/vault", + .path = "a", + .suffix = "txt", + }; + ret = download(&r); + + mu_assert("error, download failed!", ret.code <= KHTTP_400); + return 0; +} + static char * test_delete_get() { @@ -163,6 +181,7 @@ all_tests() mu_run_test(test_browse_invalid_traversal); mu_run_test(test_browse_path_too_long); mu_run_test(test_url_build); + mu_run_test(test_download); mu_run_test(test_upload_post); mu_run_test(test_delete_get); mu_run_test(test_delete_post); -- cgit v1.2.3