diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2024-12-26 17:25:35 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-12-26 17:25:35 +0100 |
commit | a29738212841dcb699dc397ad66c3416324eccf8 (patch) | |
tree | 3a28a9730f33461a34198c0c3ff50e7c73e04051 /test.c | |
parent | 69208140ddc9faa4e607cacefab6cae9badeaa7c (diff) |
remove check_request_path because we have unveil
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -3,6 +3,7 @@ #include "browse.h" #include "delete.h" +#include "download.h" #include "http.h" #include "upload.h" #include "url.h" @@ -92,6 +93,23 @@ test_upload_post() } 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() { struct kreq r; @@ -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); |