Merge develop into feature/oci-next-50-extra

Resolves the catalog index and translation conflicts with PR #524 by keeping the entries and keys of both, adds the fifty applications to categories.json and renders oci/VALIDATION.md for 464 applications.
This commit is contained in:
MacRimi
2026-10-26 07:41:00 +01:00
130 changed files with 48157 additions and 77 deletions
+62
View File
@@ -0,0 +1,62 @@
"""Guard Gonic's persistent data paths and first-run listener contract."""
import json
from pathlib import Path
import unittest
ROOT = Path(__file__).resolve().parents[1]
class GonicRecipeTests(unittest.TestCase):
def test_persistent_paths_and_listener_match_upstream_image(self):
"""Both shipped recipes must provide every configured data directory."""
for family in ("apps", "curated"):
with self.subTest(family=family):
template = json.loads(
(ROOT / "catalog" / family / "gonic.json")
.read_text(encoding="utf-8")
)
service = template["compose_stack"]["services"][0]["compose"]
environment = service["environment"]
volume_paths = {
volume["container_path"]
for volume in template["container_contract"]["volumes"]
}
preparation_paths = {
item["container_path"]
for item in template["proxmox"]["installer_profile"]
["volume_preparations"]
}
compose_volumes = set(service["volumes"])
expected_paths = {"/data", "/music", "/podcasts", "/playlists", "/cache"}
self.assertTrue(expected_paths <= volume_paths)
self.assertTrue(expected_paths <= preparation_paths)
self.assertTrue({
"./data:/data",
"./music:/music:ro",
"./podcasts:/podcasts",
"./playlists:/playlists",
"./cache:/cache",
} <= compose_volumes)
self.assertEqual(environment["GONIC_PODCAST_PATH"], "/podcasts")
self.assertEqual(environment["GONIC_PLAYLISTS_PATH"], "/playlists")
music = next(
volume for volume in template["container_contract"]["volumes"]
if volume["container_path"] == "/music"
)
self.assertTrue(music["read_only"])
self.assertEqual(template["container_contract"]["ports"][0]["container_port"], 80)
self.assertEqual(template["container_contract"]["ports"][0]["published_example"], 4747)
self.assertEqual(template["first_run"]["endpoints"][0]["port"], 80)
self.assertEqual(
template["proxmox"]["installer_profile"]["startup_healthcheck"]["port"],
80,
)
original = template["container_contract"]["original_compose"]
for volume in compose_volumes:
self.assertIn(f"- {volume}", original)
if __name__ == "__main__":
unittest.main()
+48
View File
@@ -0,0 +1,48 @@
"""Guard GoToSocial's database configuration and persistent SQLite path."""
import json
from pathlib import Path
import unittest
ROOT = Path(__file__).resolve().parents[1]
class GoToSocialRecipeTests(unittest.TestCase):
def test_sqlite_database_is_configured_in_both_recipes(self):
for family in ("apps", "curated"):
with self.subTest(family=family):
template = json.loads(
(ROOT / "catalog" / family / "gotosocial.json")
.read_text(encoding="utf-8")
)
service = template["compose_stack"]["services"][0]["compose"]
environment = service["environment"]
self.assertEqual(environment["GTS_DB_TYPE"], "sqlite")
self.assertEqual(
environment["GTS_DB_ADDRESS"],
"/gotosocial/storage/sqlite.db",
)
storage_path = "/gotosocial/storage"
self.assertIn(
storage_path,
{
volume["container_path"]
for volume in template["container_contract"]["volumes"]
},
)
self.assertIn(
"./data:/gotosocial/storage",
service["volumes"],
)
original = template["container_contract"]["original_compose"]
self.assertIn("GTS_DB_TYPE: sqlite", original)
self.assertIn(
"GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db",
original,
)
if __name__ == "__main__":
unittest.main()
+7
View File
@@ -49,6 +49,13 @@ class RecreationCatalogTests(unittest.TestCase):
self.assertEqual(candidate['template']['catalog_ui']['title']['en_US'],
catalog.compose('chromium')['catalog_ui']['title']['en_US'])
def test_curated_only_index_entry_has_internal_template_id(self):
catalog = Catalog(ROOT)
self.assertFalse((ROOT / 'catalog' / 'apps' / 'it-tools.json').exists())
item = next(item for item in catalog._curated_items({}) if item['id'] == 'it-tools')
self.assertEqual(item['template_id'], 'image-it-tools')
self.assertIsNone(item['template'])
def test_navidrome_baseurl_is_optional(self):
catalog = Catalog(ROOT)
template = catalog.compose('navidrome')