feat(test): add new tests

This commit is contained in:
2026-03-29 18:39:16 +02:00
parent c183477686
commit 4c6729eebc
12 changed files with 450 additions and 73 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ static int response_get_headers(hashmap_s *headers, char *out_headers, size_t le
size_t keys_len = 0;
char **keys = (char **)hm_get_keys(headers, &keys_len);
if (!keys) {
cws_log_debug("no headers??");
cws_log_debug("%s", "no headers??");
return -1;
}
+4 -4
View File
@@ -16,18 +16,18 @@ int main(void) {
cws_log_init();
if (signal(SIGINT, cws_signal_handler) == SIG_ERR) {
cws_log_error("signal()");
cws_log_error("%s", "signal()");
return EXIT_FAILURE;
}
if (signal(SIGTERM, cws_signal_handler) == SIG_ERR) {
cws_log_error("signal()");
cws_log_error("%s", "signal()");
return EXIT_FAILURE;
}
cws_config_s *config = cws_config_init();
if (!config) {
cws_log_error("Unable to parse config");
cws_log_error("%s", "Unable to parse config");
cws_log_shutdown();
return EXIT_FAILURE;
}
@@ -51,7 +51,7 @@ int main(void) {
cws_log_error("Unable to start web server: %s", cws_error_str(ret));
}
cws_log_info("Shutting down cws");
cws_log_info("%s", "Shutting down cws");
cws_server_shutdown(&server);
cws_config_free(config);
cws_log_shutdown();