unrip/test/bootstrap_script_static_test.py
philipp ea0a7cbb4c
All checks were successful
deploy / deploy (push) Successful in 32s
Fix bootstrap image preservation and ingest websocket close recursion
Proof: npm test; npm run operator-dashboard:build; node --test test/near-intents-ws.test.mjs; bash -n scripts/deploy/bootstrap.sh; PYTHONPATH=. python3 test/bootstrap_script_static_test.py; PYTHONPATH=. python3 test/render_release_manifest_test.py; PYTHONPATH=. python3 test/repo_deployments_test.py; PYTHONPATH=. python3 test/ntfy_manifest_test.py; kubectl kustomize deploy/k8s/base.

Assumptions: bootstrap should preserve an existing deployed release image when refreshing app secrets; websocket close/error events may be reentrant in the Node runtime.

Still fake: Notification emissions are limited to credited deposits, completed withdrawals, and completed trades with durable inventory movement; generic alert notification policy remains disabled.
2026-04-16 14:28:54 +02:00

18 lines
664 B
Python

import pathlib
import unittest
ROOT = pathlib.Path(__file__).resolve().parents[1]
class BootstrapScriptStaticTest(unittest.TestCase):
def test_bootstrap_renders_existing_release_image_instead_of_reapplying_placeholders(self):
source = (ROOT / 'scripts/deploy/bootstrap.sh').read_text()
self.assertIn('PROJECT_RELEASE_IMAGE', source)
self.assertIn('current_release_image', source)
self.assertIn('render_release_manifest.py', source)
self.assertIn('ghcr.io/example/unrip:bootstrap', source)
self.assertIn('kubectl kustomize "$ROOT_DIR/deploy/k8s/base"', source)
if __name__ == '__main__':
unittest.main()