This commit is contained in:
Mateusz Gruszczyński committed 2026-10-22 12:39:04 +02:00
1 parent cd64b9a14e
commit feb9d91a3d
7 files changed
+88 -123

No files matched your search

-24
View File
@@ -73,17 +73,6 @@ class CatalogTests(RepoFixture, unittest.TestCase):
self.assertIn("/freebsd/FreeBSD%3A15%3Aamd64/",freebsd["download_url"])
self.assertEqual("2026-10-22T08:45:00Z",freebsd["built_at"])
def test_discovery_agent_is_linux_only(self):
self.make_catalog()
self.make_file("opnsense/26.7/amd64/rustproxy-docker-agent-0.34.6_123.pkg")
self.make_file("freebsd/FreeBSD:15:amd64/rustproxy-docker-agent-0.34.6_123.pkg")
catalog = app.generate_catalog(self.repo)
self.assertEqual(6, catalog["summary"]["packages_count"])
agents = [p for p in catalog["packages"] if p["name"] == "rustproxy-docker-agent"]
self.assertEqual(2, len(agents))
self.assertEqual({"linux"}, {p["channel"] for p in agents})
self.assertEqual({"DEB", "RPM"}, {p["format"] for p in agents})
def test_mtime_backwards_compatibility(self):
self.make_file("LINUX-BUILD-INFO.txt",contents="app_version=0.21.0\npackage_release=5\n")
self.make_file("rpm/x86_64/rustproxy-0.21.0-5.x86_64.rpm")
@@ -139,19 +128,6 @@ class HttpTests(RepoFixture, unittest.TestCase):
self.addCleanup(self.server.shutdown)
self.base = f"http://127.0.0.1:{self.server.server_port}"
def test_default_english_and_agent_markup(self):
with urlopen(self.base + "/freebsd/") as response:
html = response.read().decode("utf-8")
self.assertIn('<html lang="en"', html)
self.assertIn('<h1 id="packages-title">Package <em>catalog.</em></h1>', html)
self.assertIn('id="agent-card" hidden', html)
self.assertIn('data-site="freebsd"', html)
with urlopen(self.base + "/ui/app.js") as response:
js = response.read().decode("utf-8")
self.assertIn("new Intl.DateTimeFormat('en-GB'", js)
self.assertIn("el('agent-card').hidden = !hasDockerAgent", js)
self.assertIn("agent:null", js)
def test_http_catalog_page_assets_head(self):
with urlopen(self.base + "/api/v1/packages") as response:
self.assertIn("no-store",response.headers["Cache-Control"])