feat: build CouchOS Melee appliance
Some checks failed
ci / verify (push) Has been cancelled

This commit is contained in:
jackmhny
2026-08-03 02:52:28 +02:00
commit 04ef2a0d74
42 changed files with 3671 additions and 0 deletions

23
tests/test_discovery.py Normal file
View File

@@ -0,0 +1,23 @@
from pathlib import Path
import unittest
from couchd.discovery import AllowlistError, allowlisted_target
class AllowlistTests(unittest.TestCase):
def test_rejects_target_outside_allowed_roots(self) -> None:
with self.assertRaises(AllowlistError):
allowlisted_target(
candidate=Path("/tmp/SlippiLauncher.AppImage"),
allowed_roots=[Path("/home/couch/Applications")],
allowed_names={"SlippiLauncher.AppImage"},
)
def test_accepts_allowed_target_name_under_allowed_root(self) -> None:
target = allowlisted_target(
candidate=Path("/home/couch/Applications/SlippiLauncher.AppImage"),
allowed_roots=[Path("/home/couch/Applications")],
allowed_names={"SlippiLauncher.AppImage"},
)
self.assertEqual(target, Path("/home/couch/Applications/SlippiLauncher.AppImage"))