aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_remote.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-20 20:21:34 +0200
committerDanilo M. <danix@danix.xyz>2026-10-20 20:21:34 +0200
commit91f882df97adea262625a45be0257039f144ae49 (patch)
treed7aee7910f79b63ac049579dcf56ce7b8b1b7b7b /tests/test_remote.py
parent552d8e5bb6ba6537b7031318bc5a8d7e92c971b4 (diff)
downloadsb-builder-91f882df97adea262625a45be0257039f144ae49.tar.gz
sb-builder-91f882df97adea262625a45be0257039f144ae49.zip
sbb-remote 0.9.0: SBo orphans tile on the Dashboard
stats gains "orphans", the packages whose .info says MAINTAINER="orphaned - no maintainer" (0.14s over the tree on the VM). The placeholder tile shows the count and opens Packages with only the orphaned chip on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_remote.py')
-rw-r--r--tests/test_remote.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_remote.py b/tests/test_remote.py
index 30bdc73..7288828 100644
--- a/tests/test_remote.py
+++ b/tests/test_remote.py
@@ -779,12 +779,19 @@ class JobsTest(Base):
class StatsTest(Base):
+ def test_orphans(self):
+ self.make_pkg("net/a", 'MAINTAINER="orphaned - no maintainer"\nEMAIL="NOEMAIL"\n')
+ self.make_pkg("net/b", 'MAINTAINER="Someone"\n')
+ self.make_pkg("personal/c", 'PRGNAM="c"\nMAINTAINER="orphaned - no maintainer"\n')
+ self.assertEqual(sbb._orphans(self.cfg), 2)
+
def test_missing_sources_are_null(self):
s = sbb.cmd_stats(self.cfg)
self.assertIsNotNone(s["load"])
self.assertEqual(set(s["disk"]), {"total", "free"})
self.assertIn("slackpkg", s)
self.assertIsNone(s["packages"])
+ self.assertIsNone(s["orphans"])
self.assertIsNone(s["slackrepo"])
self.assertEqual(s["sync"], {"personal": None, "pentesting": None})
json.dumps(s)