mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-07-09 16:09:13 +00:00
fix(SKY-11965): report valid PostgreSQL start command in skyvern status (#7161)
Co-authored-by: AronPerez <aperez0295@gmail.com>
This commit is contained in:
parent
d0614586f2
commit
ee0964b43a
2 changed files with 23 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import shlex
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
|
|
@ -10,8 +11,11 @@ from unittest.mock import AsyncMock, MagicMock
|
|||
|
||||
import pytest
|
||||
import typer
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from skyvern.cli.commands import cli_app
|
||||
from skyvern.cli.commands._state import CLIState, clear_state, load_state, save_state
|
||||
from skyvern.cli.status import _status_data
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _state.py
|
||||
|
|
@ -98,6 +102,24 @@ class TestOutput:
|
|||
assert parsed["error"]["message"] == "bad thing"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# status.py
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class TestStatusCommands:
|
||||
def test_status_start_commands_are_accepted_by_cli_parser(self) -> None:
|
||||
runner = CliRunner()
|
||||
|
||||
for row in _status_data():
|
||||
command_parts = shlex.split(row["start_command"])
|
||||
assert command_parts[0] == "skyvern"
|
||||
|
||||
result = runner.invoke(cli_app, [*command_parts[1:], "--help"])
|
||||
|
||||
assert result.exit_code == 0, result.output
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Connection resolution
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue