test(pdf): keep lifecycle fixtures compatible with static endpoint guard
This commit is contained in:
@@ -121,6 +121,9 @@ class LifecycleTests(unittest.TestCase):
|
||||
out = root / '.artifacts/cv-ux-01/renderer'
|
||||
saved = root / 'build.json'
|
||||
saved.write_text(json.dumps(build_record()), encoding='utf-8')
|
||||
static = root / 'job-tracker-ui/out'
|
||||
static.mkdir(parents=True)
|
||||
(static / 'fixture.js').write_text('http://localhost:5302/api')
|
||||
|
||||
class Commands:
|
||||
def __init__(self, output):
|
||||
@@ -168,7 +171,7 @@ class LifecycleTests(unittest.TestCase):
|
||||
raise OSError('Synthetic startup failure')
|
||||
return io.BytesIO(json.dumps({'version': 'cv-ux-linux-' + runner.identity(SOURCE)[:12]} if url.endswith('/health') else {'status': 'ready'}).encode())
|
||||
|
||||
options = SimpleNamespace(output=str(out), image=IMAGE, build_record=str(saved))
|
||||
options = SimpleNamespace(output=str(out), image=IMAGE, build_record=str(saved), include_template_library=False)
|
||||
with patch.object(runner, 'ROOT', root), patch.object(runner, 'Commands', Commands), \
|
||||
patch.object(runner, 'sources', return_value=SOURCE), \
|
||||
patch.object(runner, 'tree', side_effect=lambda p: build_record()['publish'] if p.name == 'publish' else {'index.html': '1' * 64}), \
|
||||
|
||||
Reference in New Issue
Block a user