feat: auto-update pouch and catalog sources during normal use
Add taste-skill to catalog.yaml, and refresh pouch plus cloned catalog or custom Git sources on a 24h interval so users do not need a separate update command.
This commit is contained in:
@@ -10,6 +10,7 @@ from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
from pouch import cli
|
||||
from pouch.auto_update import UpdateResult
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
@@ -95,14 +96,20 @@ class CreateWorkflowTests(unittest.TestCase):
|
||||
with (
|
||||
patch.object(cli, "POUCH_HOME", self.skills_home),
|
||||
patch.object(cli, "ensure_pouch_home"),
|
||||
patch.object(cli.subprocess, "run") as run,
|
||||
patch.object(
|
||||
cli,
|
||||
"run_updates",
|
||||
return_value=[
|
||||
UpdateResult("pouch", "updated", "abc1234"),
|
||||
UpdateResult("catalog:waza", "current"),
|
||||
],
|
||||
) as run_updates,
|
||||
patch.object(cli, "record_auto_update") as record,
|
||||
):
|
||||
cli.cmd_update(argparse.Namespace())
|
||||
|
||||
run.assert_called_once_with(
|
||||
["git", "-C", str(self.skills_home), "pull"],
|
||||
check=True,
|
||||
)
|
||||
run_updates.assert_called_once_with()
|
||||
record.assert_called_once()
|
||||
|
||||
def test_create_writes_draft_and_brief_without_registering_owned_skill(self) -> None:
|
||||
project = self.home / "project"
|
||||
|
||||
Reference in New Issue
Block a user