Add backend-only deployment option

This commit is contained in:
王鹏
2026-10-09 09:40:30 +08:00
parent 414218c0bd
commit eb5a276f44
5 changed files with 67 additions and 3 deletions

View File

@@ -26,6 +26,14 @@ class FakeButton:
self.state = options.get("state")
class FakeVariable:
def __init__(self, value=False):
self.value = value
def get(self):
return self.value
class GuiNavigationTests(unittest.TestCase):
def test_database_name_comes_from_first_sql_filename(self):
from pathlib import Path
@@ -66,6 +74,7 @@ class GuiNavigationTests(unittest.TestCase):
app = DeployWorkbench.__new__(DeployWorkbench)
app.deployment_running = False
app.deploy_buttons = [FakeButton()]
app.backend_only = FakeVariable(False)
app._current_plan = lambda: [object()]
app.ui_queue = object()
app._thread_log = lambda value: None
@@ -81,6 +90,7 @@ class GuiNavigationTests(unittest.TestCase):
app = DeployWorkbench.__new__(DeployWorkbench)
app.deployment_running = False
app.deploy_buttons = [FakeButton()]
app.backend_only = FakeVariable(False)
app._current_plan = lambda: [object()]
logs = []
app._append_log = logs.append