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,24 @@
import unittest
from app.core.config import settings
from app.services.ops_service import _recommend_driver_execution_mode_for_supported_modes
class OpsServiceExecutionModeRecommendationTests(unittest.TestCase):
def test_recommend_driver_execution_mode_prefers_local_runtime_for_current_node(self) -> None:
result = _recommend_driver_execution_mode_for_supported_modes(
[settings.node_code],
supported_modes=["remote-agent", "local-runtime", "ssh"],
default_mode="remote-agent",
)
self.assertEqual("local-runtime", result["execution_mode"])
self.assertIn("local-runtime", result["reason"])
self.assertEqual(
["remote-agent", "local-runtime", "ssh"],
result["supported_modes"],
)
if __name__ == "__main__":
unittest.main()