Clean action runtime project state
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
"""Tests for packages catalog and resolution."""
|
||||
|
||||
from flow.adapters.packages import (
|
||||
detect_package_manager,
|
||||
pm_cask_install_argv,
|
||||
pm_install_argv,
|
||||
pm_update_argv,
|
||||
)
|
||||
from flow.domain.packages.catalog import normalize_profile_entry, parse_catalog
|
||||
from flow.domain.packages.planning import plan_install
|
||||
from flow.domain.packages.resolution import (
|
||||
detect_package_manager,
|
||||
pm_cask_install_command,
|
||||
pm_install_command,
|
||||
pm_update_command,
|
||||
resolve_binary_asset,
|
||||
resolve_download_url,
|
||||
resolve_extract_dir,
|
||||
@@ -210,24 +212,23 @@ class TestResolveDownloadUrl:
|
||||
|
||||
class TestPmCommands:
|
||||
def test_apt_update(self):
|
||||
assert "apt-get update" in pm_update_command("apt")
|
||||
assert pm_update_argv("apt") == ["sudo", "apt-get", "update", "-qq"]
|
||||
|
||||
def test_dnf_update(self):
|
||||
assert "dnf" in pm_update_command("dnf")
|
||||
assert pm_update_argv("dnf") == ["sudo", "dnf", "check-update", "-q"]
|
||||
|
||||
def test_brew_install(self):
|
||||
cmd = pm_install_command("brew", ["fd", "rg"])
|
||||
assert "brew install" in cmd
|
||||
assert "fd" in cmd
|
||||
assert pm_install_argv("brew", ["fd", "rg"]) == ["brew", "install", "fd", "rg"]
|
||||
|
||||
def test_apt_install(self):
|
||||
cmd = pm_install_command("apt", ["fd-find"])
|
||||
assert "apt-get install" in cmd
|
||||
assert pm_install_argv("apt", ["fd-find"]) == [
|
||||
"sudo", "apt-get", "install", "-y", "-qq", "fd-find",
|
||||
]
|
||||
|
||||
def test_brew_cask_install(self):
|
||||
cmd = pm_cask_install_command("brew", ["wezterm"])
|
||||
assert "--cask" in cmd
|
||||
assert "wezterm" in cmd
|
||||
assert pm_cask_install_argv("brew", ["wezterm"]) == [
|
||||
"brew", "install", "--cask", "wezterm",
|
||||
]
|
||||
|
||||
def test_detect_package_manager_returns_something(self):
|
||||
# Just verify it doesn't error
|
||||
|
||||
Reference in New Issue
Block a user