fix: harden wasm w7 entrypoint paths
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from pathlib import Path
|
||||
|
||||
from run_network_tests import TestFailure
|
||||
|
||||
# The demo pages are not regression suites, but every one of them must at
|
||||
# least compile and render: a preprocessor or runtime change that breaks a
|
||||
# demo page (e.g. literal text that looks like an entry point) should fail CI.
|
||||
@@ -17,7 +19,12 @@ def _repo_root():
|
||||
|
||||
def _make_demo_case(page_path):
|
||||
def run(context):
|
||||
response = context.expect_status(page_path, 200)
|
||||
# sharedunit.uce exercises compiler_load_shared_unit() and can cold-compile
|
||||
# through the native fallback in a fresh worker process; keep the smoke gate
|
||||
# strict on status/body while allowing that one cold path enough time.
|
||||
response = context.request(page_path, timeout=15.0 if page_path.endswith("/sharedunit.uce") else None)
|
||||
if response.status != 200:
|
||||
raise TestFailure("expected HTTP 200 for %s, got %s %s" % (page_path, response.status, response.reason))
|
||||
body_lower = response.text.lower()
|
||||
for marker in ERROR_MARKERS:
|
||||
if marker in body_lower:
|
||||
|
||||
@@ -61,7 +61,12 @@ def _make_missing_metadata_case(file_name):
|
||||
|
||||
def _make_suite_case(page_path, expected_title):
|
||||
def run(context):
|
||||
response = context.expect_status(page_path, 200)
|
||||
# services.uce starts/stops a local HTTP listener and may cold-compile the
|
||||
# handler in a fresh worker; keep content checks strict but avoid a false
|
||||
# timeout on the operational smoke path.
|
||||
response = context.request(page_path, timeout=15.0 if page_path.endswith("/services.uce") else None)
|
||||
if response.status != 200:
|
||||
raise TestFailure("expected HTTP 200 for %s, got %s %s" % (page_path, response.status, response.reason))
|
||||
context.expect_body_contains(response, expected_title)
|
||||
|
||||
body_lower = response.text.lower()
|
||||
|
||||
Reference in New Issue
Block a user