Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 263:ee04e4e69fed | 264:04fee26ecce0 |
|---|---|
| 45 ":test_files", | 45 ":test_files", |
| 46 ], | 46 ], |
| 47 size = "large", | 47 size = "large", |
| 48 timeout = "long", | 48 timeout = "long", |
| 49 args = ["$(location //mrjunejune:mrjunejune_server)"], | 49 args = ["$(location //mrjunejune:mrjunejune_server)"], |
| 50 env = { | |
| 51 "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", | |
| 52 "AUTH_DEV_INSECURE_COOKIE": "true", | |
| 53 "SERVER_HOST": "127.0.0.1", | |
| 54 }, | |
| 50 ) | 55 ) |
| 51 | 56 |
| 52 cc_test( | 57 cc_test( |
| 53 name = "latex_renderer_test", | 58 name = "latex_renderer_test", |
| 54 srcs = ["latex_renderer_test.c"], | 59 srcs = ["latex_renderer_test.c"], |
| 59 ) | 64 ) |
| 60 | 65 |
| 61 cc_test( | 66 cc_test( |
| 62 name = "conversation_store_test", | 67 name = "conversation_store_test", |
| 63 srcs = ["conversation_store_test.c"], | 68 srcs = ["conversation_store_test.c"], |
| 64 deps = ["//mrjunejune:conversation_store"], | 69 deps = [ |
| 70 "//mrjunejune:conversation_store", | |
| 71 "//deita:deita", | |
| 72 ], | |
| 65 size = "small", | 73 size = "small", |
| 66 ) | 74 ) |
| 67 | 75 |
| 68 cc_binary( | 76 cc_binary( |
| 69 name = "inference_bridge_fake_sidecar", | 77 name = "inference_bridge_fake_sidecar", |
| 96 "//mrjunejune:mrjunejune_server", | 104 "//mrjunejune:mrjunejune_server", |
| 97 "@playwright_chromium_linux//:chrome", | 105 "@playwright_chromium_linux//:chrome", |
| 98 "@playwright_chromium_linux//:chromium", | 106 "@playwright_chromium_linux//:chromium", |
| 99 ], | 107 ], |
| 100 env = { | 108 env = { |
| 109 "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", | |
| 110 "AUTH_DEV_INSECURE_COOKIE": "true", | |
| 111 "SERVER_HOST": "127.0.0.1", | |
| 101 "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)", | 112 "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)", |
| 102 }, | 113 }, |
| 103 no_copy_to_bin = ["@playwright_chromium_linux//:chromium"], | 114 no_copy_to_bin = ["@playwright_chromium_linux//:chromium"], |
| 104 size = "large", | 115 size = "large", |
| 105 target_compatible_with = [ | 116 target_compatible_with = [ |
| 115 args = ["$(rootpath //mrjunejune:mrjunejune_server_bundle)"], | 126 args = ["$(rootpath //mrjunejune:mrjunejune_server_bundle)"], |
| 116 data = ["//mrjunejune:mrjunejune_server_bundle"], | 127 data = ["//mrjunejune:mrjunejune_server_bundle"], |
| 117 size = "small", | 128 size = "small", |
| 118 ) | 129 ) |
| 119 | 130 |
| 120 js_test( | 131 sh_test( |
| 132 name = "production_bundle_exclusion_test", | |
| 133 srcs = ["production_bundle_exclusion_test.sh"], | |
| 134 args = ["$(rootpath //mrjunejune:mrjunejune_server_bundle)"], | |
| 135 data = ["//mrjunejune:mrjunejune_server_bundle"], | |
| 136 size = "small", | |
| 137 ) | |
| 138 | |
| 139 sh_test( | |
| 140 name = "config_validation_test", | |
| 141 srcs = ["config_validation_test.sh"], | |
| 142 args = ["$(rootpath //mrjunejune:mrjunejune_server)"], | |
| 143 data = ["//mrjunejune:mrjunejune_server"], | |
| 144 size = "medium", | |
| 145 timeout = "moderate", | |
| 146 ) | |
| 147 | |
| 148 _JRPG_BROWSER_DATA = [ | |
| 149 "//hg-web/e2e:node_modules/playwright-core", | |
| 150 "//mrjunejune:mrjunejune_server_debug", | |
| 151 ":inference_bridge_fake_sidecar", | |
| 152 "shiba.webp", | |
| 153 "@playwright_chromium_linux//:chrome", | |
| 154 "@playwright_chromium_linux//:chromium", | |
| 155 ] | |
| 156 | |
| 157 _JRPG_BROWSER_ENV = { | |
| 158 "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", | |
| 159 "AUTH_DEV_INSECURE_COOKIE": "true", | |
| 160 "SERVER_HOST": "127.0.0.1", | |
| 161 "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)", | |
| 162 } | |
| 163 | |
| 164 [ | |
| 165 js_test( | |
| 166 name = "jrpg_{}_test".format(suite), | |
| 167 entry_point = "theme_and_webp_test.js", | |
| 168 data = _JRPG_BROWSER_DATA, | |
| 169 env = dict(_JRPG_BROWSER_ENV, MJJ_BROWSER_SUITE = suite), | |
| 170 no_copy_to_bin = ["@playwright_chromium_linux//:chromium"], | |
| 171 size = "large", | |
| 172 target_compatible_with = [ | |
| 173 "@platforms//cpu:x86_64", | |
| 174 "@platforms//os:linux", | |
| 175 ], | |
| 176 timeout = "long", | |
| 177 ) | |
| 178 for suite in [ | |
| 179 "core", | |
| 180 "jrpg", | |
| 181 "routing", | |
| 182 "hls", | |
| 183 ] | |
| 184 ] | |
| 185 | |
| 186 test_suite( | |
| 121 name = "theme_and_webp_test", | 187 name = "theme_and_webp_test", |
| 122 entry_point = "theme_and_webp_test.js", | 188 tests = [ |
| 123 data = [ | 189 ":jrpg_core_test", |
| 124 "//hg-web/e2e:node_modules/playwright-core", | 190 ":jrpg_hls_test", |
| 125 "//mrjunejune:mrjunejune_server_debug", | 191 ":jrpg_jrpg_test", |
| 126 ":inference_bridge_fake_sidecar", | 192 ":jrpg_routing_test", |
| 127 "shiba.webp", | 193 ], |
| 128 "@playwright_chromium_linux//:chrome", | |
| 129 "@playwright_chromium_linux//:chromium", | |
| 130 ], | |
| 131 env = { | |
| 132 "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)", | |
| 133 }, | |
| 134 no_copy_to_bin = ["@playwright_chromium_linux//:chromium"], | |
| 135 size = "large", | |
| 136 target_compatible_with = [ | |
| 137 "@platforms//cpu:x86_64", | |
| 138 "@platforms//os:linux", | |
| 139 ], | |
| 140 timeout = "long", | |
| 141 ) | 194 ) |
| 142 | 195 |
| 143 js_test( | 196 js_test( |
| 144 name = "conversation_api_test", | 197 name = "conversation_api_test", |
| 145 entry_point = "conversation_api_test.js", | 198 entry_point = "conversation_api_test.js", |
| 146 data = [ | 199 data = [ |
| 147 "//mrjunejune:mrjunejune_server", | 200 "//mrjunejune:mrjunejune_server", |
| 148 ":inference_bridge_fake_sidecar", | 201 ":inference_bridge_fake_sidecar", |
| 149 ], | 202 ], |
| 203 env = { | |
| 204 "AUTH_COOKIE_SECRET": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", | |
| 205 "AUTH_DEV_INSECURE_COOKIE": "true", | |
| 206 "SERVER_HOST": "127.0.0.1", | |
| 207 }, | |
| 150 size = "large", | 208 size = "large", |
| 151 timeout = "long", | 209 timeout = "long", |
| 152 ) | 210 ) |
| 211 | |
| 212 cc_test( | |
| 213 name = "template_renderer_test", | |
| 214 srcs = ["template_renderer_test.c"], | |
| 215 deps = [ | |
| 216 "//mrjunejune:template_renderer", | |
| 217 "//dowa:dowa", | |
| 218 ], | |
| 219 data = ["//mrjunejune:html_src_files"], | |
| 220 size = "small", | |
| 221 timeout = "short", | |
| 222 ) | |
| 223 | |
| 224 cc_test( | |
| 225 name = "auth_api_test", | |
| 226 srcs = ["auth_api_test.c"], | |
| 227 copts = ["-DAUTH_API_TEST_HOOKS"], | |
| 228 deps = [ | |
| 229 "//mrjunejune:auth_api_with_test_hooks", | |
| 230 "//auth:auth_crypto", | |
| 231 "//auth:auth_store", | |
| 232 "//dowa:dowa", | |
| 233 "//seobeo:seobeo", | |
| 234 "@openssl//:crypto", | |
| 235 ], | |
| 236 data = ["//mrjunejune:html_src_files"], | |
| 237 size = "medium", | |
| 238 timeout = "moderate", | |
| 239 ) | |
| 240 | |
| 241 cc_test( | |
| 242 name = "admin_api_test", | |
| 243 srcs = ["admin_api_test.c"], | |
| 244 copts = [ | |
| 245 "-DAUTH_API_TEST_HOOKS", | |
| 246 "-DADMIN_API_TEST_HOOKS", | |
| 247 ], | |
| 248 deps = [ | |
| 249 "//mrjunejune:admin_api_with_test_hooks", | |
| 250 "//auth:auth_crypto", | |
| 251 "//auth:auth_store", | |
| 252 "//deita:deita", | |
| 253 "//dowa:dowa", | |
| 254 "//seobeo:seobeo", | |
| 255 "@openssl//:crypto", | |
| 256 ], | |
| 257 data = ["//mrjunejune:html_src_files"], | |
| 258 size = "medium", | |
| 259 timeout = "moderate", | |
| 260 ) |