feat: add ops center and node onboarding flow
This commit is contained in:
24
domain-api/tests/test_ops_service_execution_modes.py
Normal file
24
domain-api/tests/test_ops_service_execution_modes.py
Normal 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()
|
||||
Reference in New Issue
Block a user