diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mrjunejune/test/auto_generated_test.c	Thu Jan 08 19:21:22 2026 -0800
@@ -0,0 +1,45 @@
+// Auto-generated test file
+// Source: /Users/mrjunejune/zenbu/mrjunejune/main.c
+// DO NOT EDIT - Regenerate with: bazel run //seobeo:test_generator
+
+#include "mrjunejune/test/test.h"
+
+#define TEST_HOST "127.0.0.1"
+#define TEST_PORT "6969"
+
+int main(int argc, char *argv[])
+{
+  printf("=== Auto-generated Snapshot Creator ===\n\n");
+
+  const char *server_binary = "./server";
+  if (argc > 1) server_binary = argv[1];
+
+  pid_t server_pid = start_test_server(server_binary);
+  if (server_pid < 0) return 1;
+
+  SnapshotConfig configs[] = {
+    {"/", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/resume", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/resume/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/tools", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/tools/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/tools/markdown_to_html", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/tools/markdown_to_html/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/tools/file_converter", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/tools/file_converter/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    // TODO: POST route - POST /api/convert/image-to-webp - requires request body
+    // TODO: POST route - POST /api/convert/video-to-mp4 - requires request body
+    // TODO: Dynamic route - GET /api/download/:filename - fill in actual path
+    {"/blog", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    // TODO: Dynamic route - GET /blog/:blog_id - fill in actual path
+    {"/talk", 200, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+    {"/talk/index.html", 301, SNAPSHOT_DIR, TEST_HOST, TEST_PORT},
+  };
+
+  int count = sizeof(configs) / sizeof(configs[0]);
+  int result = Seobeo_Snapshots_Create_Batch(configs, count);
+
+  stop_test_server(server_pid);
+  return result;
+}