feat: cut over to WASM backend
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
|
||||
def register(registry):
|
||||
# W4/W5 kill pages are only meaningful with the wasm backend enabled. Native
|
||||
# requests may terminate the worker by design, so keep them out of the normal
|
||||
# native suite unless the W5 harness opts in explicitly.
|
||||
if os.environ.get("UCE_INCLUDE_WASM_KILL") != "1":
|
||||
return
|
||||
|
||||
pages = [
|
||||
("wasm kill loop", "/tests/wasm-kill/loop.uce", "interrupt"),
|
||||
("wasm kill recurse", "/tests/wasm-kill/recurse.uce", "wasm_kill_recurse"),
|
||||
]
|
||||
for name, path, marker in pages:
|
||||
def make_case(page_path=path, expected_marker=marker):
|
||||
def run(context):
|
||||
response = context.expect_status(page_path, 500)
|
||||
context.expect_body_contains(response, "wasm runtime error during request")
|
||||
context.expect_body_contains(response, expected_marker)
|
||||
# The worker should remain healthy after the trap.
|
||||
health = context.expect_status("/demo/hello.uce", 200)
|
||||
context.expect_body_contains(health, "hello world")
|
||||
return "clean wasm trap page and post-trap health check for %s" % page_path
|
||||
return run
|
||||
registry.case(name, make_case(), tags=["http", "uce", "wasm", "kill", "internal"])
|
||||
Reference in New Issue
Block a user