diff mrjunejune/test/BUILD @ 264:04fee26ecce0

add authenticated JRPG conversation platform Add reusable auth/session storage, owned conversation recovery, guest quotas, admin workflows, URL-routed conversation UI, mobile frame support, and parallel browser acceptance. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 07:34:12 -0700
parents ee04e4e69fed
children 056790c4fb0d
line wrap: on
line diff
--- a/mrjunejune/test/BUILD	Thu Aug 06 11:31:30 2026 -0700
+++ b/mrjunejune/test/BUILD	Fri Aug 07 07:34:12 2026 -0700
@@ -47,6 +47,11 @@
   size = "large",
   timeout = "long",
   args = ["$(location //mrjunejune:mrjunejune_server)"],
+  env = {
+    "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+    "AUTH_DEV_INSECURE_COOKIE": "true",
+    "SERVER_HOST": "127.0.0.1",
+  },
 )
 
 cc_test(
@@ -61,7 +66,10 @@
 cc_test(
   name = "conversation_store_test",
   srcs = ["conversation_store_test.c"],
-  deps = ["//mrjunejune:conversation_store"],
+  deps = [
+    "//mrjunejune:conversation_store",
+    "//deita:deita",
+  ],
   size = "small",
 )
 
@@ -98,6 +106,9 @@
     "@playwright_chromium_linux//:chromium",
   ],
   env = {
+    "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+    "AUTH_DEV_INSECURE_COOKIE": "true",
+    "SERVER_HOST": "127.0.0.1",
     "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)",
   },
   no_copy_to_bin = ["@playwright_chromium_linux//:chromium"],
@@ -117,27 +128,69 @@
   size = "small",
 )
 
-js_test(
+sh_test(
+  name = "production_bundle_exclusion_test",
+  srcs = ["production_bundle_exclusion_test.sh"],
+  args = ["$(rootpath //mrjunejune:mrjunejune_server_bundle)"],
+  data = ["//mrjunejune:mrjunejune_server_bundle"],
+  size = "small",
+)
+
+sh_test(
+  name = "config_validation_test",
+  srcs = ["config_validation_test.sh"],
+  args = ["$(rootpath //mrjunejune:mrjunejune_server)"],
+  data = ["//mrjunejune:mrjunejune_server"],
+  size = "medium",
+  timeout = "moderate",
+)
+
+_JRPG_BROWSER_DATA = [
+  "//hg-web/e2e:node_modules/playwright-core",
+  "//mrjunejune:mrjunejune_server_debug",
+  ":inference_bridge_fake_sidecar",
+  "shiba.webp",
+  "@playwright_chromium_linux//:chrome",
+  "@playwright_chromium_linux//:chromium",
+]
+
+_JRPG_BROWSER_ENV = {
+  "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+  "AUTH_DEV_INSECURE_COOKIE": "true",
+  "SERVER_HOST": "127.0.0.1",
+  "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)",
+}
+
+[
+  js_test(
+    name = "jrpg_{}_test".format(suite),
+    entry_point = "theme_and_webp_test.js",
+    data = _JRPG_BROWSER_DATA,
+    env = dict(_JRPG_BROWSER_ENV, MJJ_BROWSER_SUITE = suite),
+    no_copy_to_bin = ["@playwright_chromium_linux//:chromium"],
+    size = "large",
+    target_compatible_with = [
+      "@platforms//cpu:x86_64",
+      "@platforms//os:linux",
+    ],
+    timeout = "long",
+  )
+  for suite in [
+    "core",
+    "jrpg",
+    "routing",
+    "hls",
+  ]
+]
+
+test_suite(
   name = "theme_and_webp_test",
-  entry_point = "theme_and_webp_test.js",
-  data = [
-    "//hg-web/e2e:node_modules/playwright-core",
-    "//mrjunejune:mrjunejune_server_debug",
-    ":inference_bridge_fake_sidecar",
-    "shiba.webp",
-    "@playwright_chromium_linux//:chrome",
-    "@playwright_chromium_linux//:chromium",
+  tests = [
+    ":jrpg_core_test",
+    ":jrpg_hls_test",
+    ":jrpg_jrpg_test",
+    ":jrpg_routing_test",
   ],
-  env = {
-    "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)",
-  },
-  no_copy_to_bin = ["@playwright_chromium_linux//:chromium"],
-  size = "large",
-  target_compatible_with = [
-    "@platforms//cpu:x86_64",
-    "@platforms//os:linux",
-  ],
-  timeout = "long",
 )
 
 js_test(
@@ -147,6 +200,61 @@
     "//mrjunejune:mrjunejune_server",
     ":inference_bridge_fake_sidecar",
   ],
+  env = {
+    "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+    "AUTH_DEV_INSECURE_COOKIE": "true",
+    "SERVER_HOST": "127.0.0.1",
+  },
   size = "large",
   timeout = "long",
 )
+
+cc_test(
+  name = "template_renderer_test",
+  srcs = ["template_renderer_test.c"],
+  deps = [
+    "//mrjunejune:template_renderer",
+    "//dowa:dowa",
+  ],
+  data = ["//mrjunejune:html_src_files"],
+  size = "small",
+  timeout = "short",
+)
+
+cc_test(
+  name = "auth_api_test",
+  srcs = ["auth_api_test.c"],
+  copts = ["-DAUTH_API_TEST_HOOKS"],
+  deps = [
+    "//mrjunejune:auth_api_with_test_hooks",
+    "//auth:auth_crypto",
+    "//auth:auth_store",
+    "//dowa:dowa",
+    "//seobeo:seobeo",
+    "@openssl//:crypto",
+  ],
+  data = ["//mrjunejune:html_src_files"],
+  size = "medium",
+  timeout = "moderate",
+)
+
+cc_test(
+  name = "admin_api_test",
+  srcs = ["admin_api_test.c"],
+  copts = [
+    "-DAUTH_API_TEST_HOOKS",
+    "-DADMIN_API_TEST_HOOKS",
+  ],
+  deps = [
+    "//mrjunejune:admin_api_with_test_hooks",
+    "//auth:auth_crypto",
+    "//auth:auth_store",
+    "//deita:deita",
+    "//dowa:dowa",
+    "//seobeo:seobeo",
+    "@openssl//:crypto",
+  ],
+  data = ["//mrjunejune:html_src_files"],
+  size = "medium",
+  timeout = "moderate",
+)