feat: add ops center and node onboarding flow

This commit is contained in:
Your Name
2026-04-18 23:52:51 +08:00
parent 246838ae4c
commit b9c29481b5
142 changed files with 89727 additions and 186 deletions

View File

@@ -0,0 +1,29 @@
from __future__ import annotations
import unittest
from pathlib import Path
class ReleaseMetadataParityTests(unittest.TestCase):
def test_powershell_release_package_emits_archive_path_alias(self) -> None:
repo_root = Path(__file__).resolve().parents[2]
script_text = (repo_root / "package_domain_release.ps1").read_text(encoding="utf-8")
self.assertIn("archive_path = $zipPath", script_text)
self.assertIn('"archive_path=$zipPath"', script_text)
def test_powershell_release_flow_prefers_archive_path_with_zip_fallback(self) -> None:
repo_root = Path(__file__).resolve().parents[2]
prepare_text = (repo_root / "prepare_final_release.ps1").read_text(encoding="utf-8")
show_text = (repo_root / "show_latest_release.ps1").read_text(encoding="utf-8")
self.assertIn("$archivePath = if ($latest.archive_path) { $latest.archive_path } else { $latest.zip_path }", prepare_text)
self.assertIn('& (Join-Path $root "package_domain_release.ps1")', prepare_text)
self.assertIn('& (Join-Path $root "verify_domain_release.ps1")', prepare_text)
self.assertNotIn('powershell -ExecutionPolicy Bypass -File (Join-Path $root "package_domain_release.ps1")', prepare_text)
self.assertIn("$reportArchivePath = if ($report.latest_release.archive_path) { [string]$report.latest_release.archive_path } else { [string]$report.latest_release.zip_path }", show_text)
self.assertIn("$latestArchivePath = if ($latest.archive_path) { [string]$latest.archive_path } else { [string]$latest.zip_path }", show_text)
if __name__ == "__main__":
unittest.main()