comparison mrjunejune/test/auto_generated_test.c @ 129:f7860f491a8c

--amend
author June Park <parkjune1995@gmail.com>
date Thu, 08 Jan 2026 19:21:22 -0800
parents
children c1eab8c0b0f9
comparison
equal deleted inserted replaced
128:7eb79fd91c7e 129:f7860f491a8c
1 // Auto-generated test file
2 // Source: /Users/mrjunejune/zenbu/mrjunejune/main.c
3 // DO NOT EDIT - Regenerate with: bazel run //seobeo:test_generator
4
5 #include "mrjunejune/test/test.h"
6
7 #define TEST_HOST "127.0.0.1"
8 #define TEST_PORT "6969"
9
10 int main(int argc, char *argv[])
11 {
12 printf("=== Auto-generated Snapshot Creator ===\n\n");
13
14 const char *server_binary = "./server";
15 if (argc > 1) server_binary = argv[1];
16
17 pid_t server_pid = start_test_server(server_binary);
18 if (server_pid < 0) return 1;
19
20 SnapshotConfig configs[] = {
21 {"/", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
22 {"/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
23 {"/resume", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
24 {"/resume/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
25 {"/tools", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
26 {"/tools/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
27 {"/tools/markdown_to_html", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
28 {"/tools/markdown_to_html/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
29 {"/tools/file_converter", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
30 {"/tools/file_converter/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
31 // TODO: POST route - POST /api/convert/image-to-webp - requires request body
32 // TODO: POST route - POST /api/convert/video-to-mp4 - requires request body
33 // TODO: Dynamic route - GET /api/download/:filename - fill in actual path
34 {"/blog", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
35 // TODO: Dynamic route - GET /blog/:blog_id - fill in actual path
36 {"/talk", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
37 {"/talk/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
38 };
39
40 int count = sizeof(configs) / sizeof(configs[0]);
41 int result = Seobeo_Snapshots_Create_Batch(configs, count);
42
43 stop_test_server(server_pid);
44 return result;
45 }